This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.3.4!spring-doc.cn

This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.3.4!spring-doc.cn

Spring Boot Actuator displays build-related information if a META-INF/build-info.properties file is present. The build-info goal generates such file with the coordinates of the project and the build time. It also allows you to add an arbitrary number of additional properties, as shown in the following example:spring-doc.cn

<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>

This configuration will generate a build-info.properties at the expected location with three additional keys.spring-doc.cn

java.version is expected to be a regular property available in the project. It will be interpolated as you would expect.
java.version is expected to be a regular property available in the project. It will be interpolated as you would expect.

spring-boot:build-info

org.springframework.boot:spring-boot-maven-plugin:3.4.0-SNAPSHOTspring-doc.cn

Generate a build-info.properties file based on the content of the current MavenProject.spring-doc.cn

Optional parameters

Name Type Default

additionalPropertiesspring-doc.cn

Mapspring-doc.cn

excludeInfoPropertiesspring-doc.cn

Listspring-doc.cn

outputFilespring-doc.cn

Filespring-doc.cn

${project.build.outputDirectory}/META-INF/build-info.propertiesspring-doc.cn

skipspring-doc.cn

booleanspring-doc.cn

falsespring-doc.cn

timespring-doc.cn

Stringspring-doc.cn

${project.build.outputTimestamp}spring-doc.cn

Parameter details

additionalProperties

Additional properties to store in the build-info.properties file. Each entry is prefixed by build. in the generated build-info.properties.spring-doc.cn

Namespring-doc.cn

additionalPropertiesspring-doc.cn

Typespring-doc.cn

java.util.Mapspring-doc.cn

Default valuespring-doc.cn

User propertyspring-doc.cn

Sincespring-doc.cn

excludeInfoProperties

Properties that should be excluded build-info.properties file. Can be used to exclude the standard group, artifact, name, version or time properties as well as items from additionalProperties.spring-doc.cn

Namespring-doc.cn

excludeInfoPropertiesspring-doc.cn

Typespring-doc.cn

java.util.Listspring-doc.cn

Default valuespring-doc.cn

User propertyspring-doc.cn

Sincespring-doc.cn

outputFile

The location of the generated build-info.properties file.spring-doc.cn

Namespring-doc.cn

outputFilespring-doc.cn

Typespring-doc.cn

java.io.Filespring-doc.cn

Default valuespring-doc.cn

${project.build.outputDirectory}/META-INF/build-info.propertiesspring-doc.cn

User propertyspring-doc.cn

Sincespring-doc.cn

skip

Skip the execution.spring-doc.cn

Namespring-doc.cn

skipspring-doc.cn

Typespring-doc.cn

booleanspring-doc.cn

Default valuespring-doc.cn

falsespring-doc.cn

User propertyspring-doc.cn

spring-boot.build-info.skipspring-doc.cn

Sincespring-doc.cn

3.1.0spring-doc.cn

time

The value used for the build.time property in a form suitable for Instant#parse(CharSequence). Defaults to project.build.outputTimestamp or session.request.startTime if the former is not set. To disable the build.time property entirely, use 'off' or add it to excludeInfoProperties.spring-doc.cn

Namespring-doc.cn

timespring-doc.cn

Typespring-doc.cn

java.lang.Stringspring-doc.cn

Default valuespring-doc.cn

${project.build.outputTimestamp}spring-doc.cn

User propertyspring-doc.cn

Sincespring-doc.cn

2.2.0spring-doc.cn

Name Type Default

additionalPropertiesspring-doc.cn

Mapspring-doc.cn

excludeInfoPropertiesspring-doc.cn

Listspring-doc.cn

outputFilespring-doc.cn

Filespring-doc.cn

${project.build.outputDirectory}/META-INF/build-info.propertiesspring-doc.cn

skipspring-doc.cn

booleanspring-doc.cn

falsespring-doc.cn

timespring-doc.cn

Stringspring-doc.cn

${project.build.outputTimestamp}spring-doc.cn

Namespring-doc.cn

additionalPropertiesspring-doc.cn

Typespring-doc.cn

java.util.Mapspring-doc.cn

Default valuespring-doc.cn

User propertyspring-doc.cn

Sincespring-doc.cn

Namespring-doc.cn

excludeInfoPropertiesspring-doc.cn

Typespring-doc.cn

java.util.Listspring-doc.cn

Default valuespring-doc.cn

User propertyspring-doc.cn

Sincespring-doc.cn

Namespring-doc.cn

outputFilespring-doc.cn

Typespring-doc.cn

java.io.Filespring-doc.cn

Default valuespring-doc.cn

${project.build.outputDirectory}/META-INF/build-info.propertiesspring-doc.cn

User propertyspring-doc.cn

Sincespring-doc.cn

Namespring-doc.cn

skipspring-doc.cn

Typespring-doc.cn

booleanspring-doc.cn

Default valuespring-doc.cn

falsespring-doc.cn

User propertyspring-doc.cn

spring-boot.build-info.skipspring-doc.cn

Sincespring-doc.cn

3.1.0spring-doc.cn

Namespring-doc.cn

timespring-doc.cn

Typespring-doc.cn

java.lang.Stringspring-doc.cn

Default valuespring-doc.cn

${project.build.outputTimestamp}spring-doc.cn

User propertyspring-doc.cn

Sincespring-doc.cn

2.2.0spring-doc.cn