Commit aa59f87e0f3716110ed50847a9f7b88e34de7b93
1 parent
b410e3f1
update
Showing
1 changed file
with
32 additions
and
1 deletions
pom.xml
| ... | ... | @@ -194,8 +194,15 @@ |
| 194 | 194 | </dependencies> |
| 195 | 195 | |
| 196 | 196 | <build> |
| 197 | + <resources> | |
| 198 | + <resource> | |
| 199 | + <!-- 指定配置文件所在的resource目录 --> | |
| 200 | + <directory>src/main/resources</directory> | |
| 201 | + <filtering>true</filtering> | |
| 202 | + </resource> | |
| 203 | + </resources> | |
| 197 | 204 | <!-- 指定打包名称--> |
| 198 | - <finalName>cnlive_shenhe</finalName> | |
| 205 | + <finalName>cnlive_shenhe_${environment}</finalName> | |
| 199 | 206 | <plugins> |
| 200 | 207 | <plugin> |
| 201 | 208 | <groupId>org.springframework.boot</groupId> |
| ... | ... | @@ -228,4 +235,28 @@ |
| 228 | 235 | </plugins> |
| 229 | 236 | </build> |
| 230 | 237 | |
| 238 | + <!--分别设置开发,测试,生产环境--> | |
| 239 | + <profiles> | |
| 240 | + <!-- 开发环境 --> | |
| 241 | + <profile> | |
| 242 | + <id>dev</id> | |
| 243 | + <activation> | |
| 244 | + <activeByDefault>true</activeByDefault> | |
| 245 | + </activation> | |
| 246 | + <properties> | |
| 247 | + <environment>dev</environment> | |
| 248 | + </properties> | |
| 249 | + </profile> | |
| 250 | + <!-- 生产环境 --> | |
| 251 | + <profile> | |
| 252 | + <id>prod</id> | |
| 253 | + <activation> | |
| 254 | + <activeByDefault>false</activeByDefault> | |
| 255 | + </activation> | |
| 256 | + <properties> | |
| 257 | + <environment>prod</environment> | |
| 258 | + </properties> | |
| 259 | + </profile> | |
| 260 | + </profiles> | |
| 261 | + | |
| 231 | 262 | </project> | ... | ... |