|
@@ -78,6 +78,14 @@
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
</plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-resources-plugin</artifactId>
|
|
|
+ <configuration>
|
|
|
+ <delimiters>@</delimiters>
|
|
|
+ <useDefaultDelimiters>false</useDefaultDelimiters>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
</plugins>
|
|
|
<resources>
|
|
|
<!-- 解决MyBatis配置文件引入问题 -->
|
|
@@ -88,11 +96,38 @@
|
|
|
<include>**/*.xml</include>
|
|
|
</includes>
|
|
|
<!-- 是否替换资源中的属性-->
|
|
|
- <filtering>false</filtering>
|
|
|
+ <filtering>true</filtering>
|
|
|
</resource>
|
|
|
<resource>
|
|
|
<directory>src/main/resources</directory>
|
|
|
+ <filtering>true</filtering>
|
|
|
</resource>
|
|
|
</resources>
|
|
|
</build>
|
|
|
+
|
|
|
+ <profiles>
|
|
|
+ <profile>
|
|
|
+ <id>dev</id>
|
|
|
+ <properties>
|
|
|
+ <!-- 环境标识,需要与配置文件的名称相对应 -->
|
|
|
+ <activatedProperties>dev</activatedProperties>
|
|
|
+ </properties>
|
|
|
+ <activation>
|
|
|
+ <!-- 默认环境 -->
|
|
|
+ <activeByDefault>true</activeByDefault>
|
|
|
+ </activation>
|
|
|
+ </profile>
|
|
|
+ <profile>
|
|
|
+ <id>test</id>
|
|
|
+ <properties>
|
|
|
+ <activatedProperties>test</activatedProperties>
|
|
|
+ </properties>
|
|
|
+ </profile>
|
|
|
+ <profile>
|
|
|
+ <id>prod</id>
|
|
|
+ <properties>
|
|
|
+ <activatedProperties>prod</activatedProperties>
|
|
|
+ </properties>
|
|
|
+ </profile>
|
|
|
+ </profiles>
|
|
|
</project>
|