<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>timestamp-property</id>
<goals>
<goal>timestamp-property</goal>
</goals>
<configuration>
<name>build.time</name>
<pattern>yyyy-MM-dd_HH-mm</pattern>
<timeZone>GMT+8</timeZone>
</configuration>
</execution>
</executions>
<inherited>false</inherited>
</plugin>
</plugins>
<profiles>
<profile>
<id>pro</id>
<activation>
<!--默认激活-->
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<spring.profiles.active>dev</spring.profiles.active>
<!--maven.build.timestamp保存了maven编译时间戳-->
<timestamp>${maven.build.timestamp}</timestamp>
<!--指定时间格式-->
<maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
</properties>
</profile>
</profiles>
springboot配置文件取pom打包时间
最新推荐文章于 2022-10-15 15:34:08 发布