此版本仍在开发中,尚未被视为稳定版本。对于最新的稳定版本,请使用 Spring Boot 3.3.1! |
此版本仍在开发中,尚未被视为稳定版本。对于最新的稳定版本,请使用 Spring Boot 3.3.1! |
如果存在文件,Spring Boot Actuator 会显示与构建相关的信息。
目标生成包含项目坐标和构建时间的此类文件。
它还允许您添加任意数量的附加属性,如以下示例所示:META-INF/build-info.properties
build-info
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>build-info</artifactId>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
<configuration>
<additionalProperties>
<encoding.source>UTF-8</encoding.source>
<encoding.reporting>UTF-8</encoding.reporting>
<java.version>${java.version}</java.version>
</additionalProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
此配置将在预期位置生成一个具有三个附加密钥的密钥。build-info.properties
java.version 预计将成为项目中可用的常规属性。
它将如您预期的那样进行插值。 |
java.version 预计将成为项目中可用的常规属性。
它将如您预期的那样进行插值。 |
spring-boot:build-info
org.springframework.boot:spring-boot-maven-plugin:3.3.2-SNAPSHOT
根据当前的内容生成文件。build-info.properties
MavenProject
可选参数
名字 | 类型 | 违约 |
---|---|---|
|
||
|
||
|
|
|
|
|
|
|
|
参数详细信息
additionalProperties
要存储在文件中的其他属性。每个条目都以 in 生成的前缀。build-info.properties
build.
build-info.properties
名字 |
|
---|---|
类型 |
|
默认值 |
|
User 属性 |
|
因为 |
excludeInfoProperties
应排除的属性文件。可用于排除标准 、 、 或属性以及 中的项。build-info.properties
group
artifact
name
version
time
additionalProperties
名字 |
|
---|---|
类型 |
|
默认值 |
|
User 属性 |
|
因为 |
名字 | 类型 | 违约 |
---|---|---|
|
||
|
||
|
|
|
|
|
|
|
|
名字 |
|
---|---|
类型 |
|
默认值 |
|
User 属性 |
|
因为 |
名字 |
|
---|---|
类型 |
|
默认值 |
|
User 属性 |
|
因为 |
名字 |
|
---|---|
类型 |
|
默认值 |
|
User 属性 |
|
因为 |
名字 |
|
---|---|
类型 |
|
默认值 |
|
User 属性 |
|
因为 |
|
名字 |
|
---|---|
类型 |
|
默认值 |
|
User 属性 |
|
因为 |
|