编译-compile-test-provided-runtime
compile 编译、测试、运行
test 测试
provided 编译 运行
runtime 测试、运行
springboot读取pom
使用yml或者properties 读物pom定义的属性,然后由yml或者properties进入到enivroment环境中。
<build> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> <plugins> <plugin> <artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>utf-8</encoding> <useDefaultDelimiters>true</useDefaultDelimiters> </configuration> </plugin>
如果用${} 读取的话,需要
<plugin> <artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>utf-8</encoding> <useDefaultDelimiters>true</useDefaultDelimiters> </configuration> </plugin>