spring-boot
spring-boot copied to clipboard
A Cloud Native Buildpack that contributes Spring Boot dependency information and slices an application into multiple layers
gcr.io/paketo-buildpacks/spring-boot
The Paketo Buildpack for Spring Boot is a Cloud Native Buildpack that contributes Spring Boot dependency information and slices an application into multiple layers.
Behavior
This buildpack will always detect.
This buildpack will participate at build time if all the following conditions are met:
<APPLICATION_ROOT>/META-INF/MANIFEST.MFcontains aSpring-Boot-Versionentry
The buildpack will do the following:
- Contributes Spring Boot version to
org.springframework.boot.versionimage label - If
<APPLICATION_ROOT>/META-INF/dataflow-configuration-metadata.propertiesexists- Contributes Spring Boot configuration metadata to
org.springframework.boot.spring-configuration-metadata.jsonimage label - Contributes Spring Cloud Data Flow configuration metadata to
org.springframework.cloud.dataflow.spring-configuration-metadata.jsonimage label
- Contributes Spring Boot configuration metadata to
- Contributes
Implementation-Titlemanifest entry toorg.opencontainers.image.titleimage label - Contributes
Implementation-versionmanifest entry toorg.opencontainers.image.versionimage label - Contributes dependency information extracted from Maven naming conventions to the image's BOM
- When contributing to a JVM application:
- Contributes Spring Cloud Bindings as an application dependency
- This enables bindings-aware Spring Boot auto-configuration when CNB bindings are present during launch
- If
<APPLICATION_ROOT>/META-INF/MANIFEST.MFcontains aSpring-Boot-Layers-Indexentry- Contributes application slices as defined by the layer's index
- If the application is a reactive web application
- Configures
$BPL_JVM_THREAD_COUNTto 50
- Configures
- Contributes Spring Cloud Bindings as an application dependency
- When contributing to a native image application:
- Adds classes from the executable JAR and entries from
classpath.idxto the build-time class path, so they are available tonative-image
- Adds classes from the executable JAR and entries from
Configuration
| Environment Variable | Description |
|---|---|
$BP_SPRING_CLOUD_BINDINGS_DISABLED |
Whether to contribute Spring Cloud Bindings support to the image at build time. Defaults to false. |
$BPL_SPRING_CLOUD_BINDINGS_DISABLED |
Whether to auto-configure Spring Boot environment properties from bindings at runtime. This requires Spring Cloud Bindings to have been installed at build time or it will do nothing. Defaults to false. |
$BPL_SPRING_CLOUD_BINDINGS_ENABLED |
Deprecated in favour of $BPL_SPRING_CLOUD_BINDINGS_DISABLED. Whether to auto-configure Spring Boot environment properties from bindings at runtime. This requires Spring Cloud Bindings to have been installed at build time or it will do nothing. Defaults to true. |
Bindings
The buildpack optionally accepts the following bindings:
Type: dependency-mapping
| Key | Value | Description |
|---|---|---|
<dependency-digest> |
<uri> |
If needed, the buildpack will fetch the dependency with digest <dependency-digest> from <uri> |
License
This buildpack is released under version 2.0 of the Apache License.