👷 maven ci 适配

This commit is contained in:
ronger 2022-09-26 07:53:32 +08:00
parent 4ed7754fe6
commit d101befddd
2 changed files with 64 additions and 2 deletions

61
pom.xml
View File

@ -272,15 +272,74 @@
<include>**/**/*.xml</include>
</includes>
</resource>
<!-- 资源文件配置 -->
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>**/**</include>
</includes>
</resource>
<!-- 过滤配置文件到config目录 -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<targetPath>config</targetPath>
<includes>
<include>application.yml</include>
<include>application-${profileActive}.yml</include>
<include>banner.txt</include>
<include>logback.xml</include>
<include>*.properties</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.5.RELEASE</version>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>woff</nonFilteredFileExtension>
<nonFilteredFileExtension>woff2</nonFilteredFileExtension>
<nonFilteredFileExtension>eot</nonFilteredFileExtension>
<nonFilteredFileExtension>ttf</nonFilteredFileExtension>
<nonFilteredFileExtension>svg</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
</plugins>
<finalName>forest</finalName>
</build>
</build><!--MAVEN打包选择运行环境-->
<!-- 1:dev:开发环境 2:prod:生产环境 -->
<profiles>
<profile>
<id>dev</id>
<properties>
<profileActive>dev</profileActive>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>prod</id>
<properties>
<profileActive>prod</profileActive>
</properties>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
</profile>
</profiles>
</project>

View File

@ -1,6 +1,9 @@
---
spring:
profiles:
active: dev
active: '@profileActive@'
---
spring:
thymeleaf:
prefix: classpath:/templates/
suffix: .html