{"id":20847487,"url":"https://github.com/paketo-buildpacks/spring-boot","last_synced_at":"2026-01-28T03:14:20.626Z","repository":{"id":37896565,"uuid":"247484536","full_name":"paketo-buildpacks/spring-boot","owner":"paketo-buildpacks","description":"A Cloud Native Buildpack that contributes Spring Boot dependency information and slices an application into multiple layers","archived":false,"fork":false,"pushed_at":"2025-05-14T02:29:21.000Z","size":1064,"stargazers_count":182,"open_issues_count":20,"forks_count":21,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-14T18:02:16.035Z","etag":null,"topics":["cnb","hacktoberfest","jvm-applications","spring-boot"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paketo-buildpacks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-15T14:39:09.000Z","updated_at":"2025-05-01T03:00:41.000Z","dependencies_parsed_at":"2023-10-16T23:57:36.259Z","dependency_job_id":"94c90112-0a47-483b-b6fe-08185df7b1a6","html_url":"https://github.com/paketo-buildpacks/spring-boot","commit_stats":null,"previous_names":[],"tags_count":109,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paketo-buildpacks%2Fspring-boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paketo-buildpacks%2Fspring-boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paketo-buildpacks%2Fspring-boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paketo-buildpacks%2Fspring-boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paketo-buildpacks","download_url":"https://codeload.github.com/paketo-buildpacks/spring-boot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198453,"owners_count":22030964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cnb","hacktoberfest","jvm-applications","spring-boot"],"created_at":"2024-11-18T02:21:17.507Z","updated_at":"2026-01-28T03:14:20.621Z","avatar_url":"https://github.com/paketo-buildpacks.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Paketo Buildpack for Spring Boot\n\n## Buildpack ID: `paketo-buildpacks/spring-boot`\n## Registry URLs: `docker.io/paketobuildpacks/spring-boot`\n\nThe Paketo Buildpack for Spring Boot is a Cloud Native Buildpack that contributes Spring Boot dependency information and slices an application into multiple layers.\n\n## Behavior\n\nThis buildpack will always detect.\n\nThis buildpack will participate at build time if all the following conditions are met:\n\n* `\u003cAPPLICATION_ROOT\u003e/META-INF/MANIFEST.MF` contains a `Spring-Boot-Version` entry\n\nThe buildpack will do the following:\n\n* Contributes Spring Boot version to `org.springframework.boot.version` image label\n* If `\u003cAPPLICATION_ROOT\u003e/META-INF/dataflow-configuration-metadata.properties` exists\n  * Contributes Spring Boot configuration metadata to `org.springframework.boot.spring-configuration-metadata.json` image label\n  * Contributes Spring Cloud Data Flow configuration metadata to `org.springframework.cloud.dataflow.spring-configuration-metadata.json` image label\n* Contributes `Implementation-Title` manifest entry to `org.opencontainers.image.title` image label\n* Contributes `Implementation-version` manifest entry to `org.opencontainers.image.version` image label\n* Contributes dependency information extracted from Maven naming conventions to the image's BOM\n* When contributing to a JVM application:\n    * Contributes [Spring Cloud Bindings][b] as an application dependency\n      * This enables bindings-aware Spring Boot auto-configuration when [CNB bindings][c] are present during launch\n      * The version of the Spring Cloud Bindings library to install will be determined by (in order):\n        * An explicit value set in `BP_SPRING_CLOUD_BINDINGS_VERSION` by the user\n        * The Spring Boot version from  `\u003cAPPLICATION_ROOT\u003e/META-INF/MANIFEST.MF`: Boot 2.x will install Spring Cloud Bindings v1, Boot 3.x will install Spring Cloud Bindings v2\n    * If `\u003cAPPLICATION_ROOT\u003e/META-INF/MANIFEST.MF` contains a `Spring-Boot-Layers-Index` entry\n      * Contributes application slices as defined by the layer's index\n    * If the application is a reactive web application\n      * Configures `$BPL_JVM_THREAD_COUNT` to 50\n    * If the application is AOT instrumented (presence of `META-INF/native-image` folder) AND `BP_SPRING_AOT_ENABLED` is set to `true`\n      * set `BPL_SPRING_AOT_ENABLED` to true\n      * add `-Dspring.aot.enabled=true` to `JAVA_TOOL_OPTIONS` at runtime\n    * If the application is AOT instrumented (presence of `META-INF/native-image` folder) AND `BP_SPRING_AOT_ENABLED` is set to `true` AND `TRAINING_RUN_JAVA_TOOL_OPTIONS` (or deprecated CDS_TRAINING_JAVA_TOOL_OPTIONS`) is set\n      * fail the build with \"build failed because of invalid user configuration\" - the reason being is that the AOT classes used during training run won't be compatible with a different set of `JAVA_TOOL_OPTIONS` at runtime\n      * the Spring team explains this issue in detail here: https://github.com/spring-projects/spring-boot/issues/41348\n* If `\u003cAPPLICATION_ROOT\u003e/META-INF/MANIFEST.MF` contains a `Spring-Boot-Native-Processed` entry OR if `$BP_MAVEN_ACTIVE_PROFILES` contains the `native` profile:\n  * A build plan entry is provided, `native-image-application`, which can be required by the `native-image` [buildpack](https://github.com/paketo-buildpacks/native-image) to automatically trigger a native image build\n* When contributing to a native image application:\n   * Adds classes from the executable JAR and entries from `classpath.idx` to the build-time class path, so they are available to `native-image`\n\n[b]: https://github.com/spring-cloud/spring-cloud-bindings\n[c]: https://github.com/buildpacks/spec/blob/main/extensions/bindings.md\n\n## Configuration\n| Environment Variable                  | Description                                                                                                                                                                                                                                                       |\n|---------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `$BP_SPRING_CLOUD_BINDINGS_DISABLED`  | Whether to contribute Spring Cloud Bindings support to the image at build time.  Defaults to false.                                                                                                                                                               |\n| `$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.                                                         |\n| `$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. |\n| `$BP_SPRING_CLOUD_BINDINGS_VERSION`   | Explicit version of Spring Cloud Bindings library to install.                                                                                                                                                                                                     |\n| `$BP_SPRING_AOT_ENABLED`              | Whether to contribute `$BPL_SPRING_AOT_ENABLED` at runtime. Beware that the Spring Boot app needs to have been AOT instrumented (presence of `META-INF/native-image`) too. Defaults to false.                                                                     |\n| `$BPL_SPRING_AOT_ENABLED`             | Whether to contribute `-Dspring.aot.enabled=true` to `JAVA_TOOL_OPTIONS` at runtime. Defaults to yes if the above conditions were met; false otherwise                                                                                                            |                                                                                                           \n| `$BP_UNPACK_LAYOUT_ONLY`              | Whether to only unpack the Spring Boot app, and not apply a CDS / AOT Cache training run                                                                                                                                                                          |\n| `$BP_JVM_CDS_ENABLED`                 | Deprecated, use `BP_JVM_AOTCACHE_ENABLED`  - Whether to perform the CDS training run (that will generate the caching file `application.jsa`). Defaults to false.                                                                                                                                              |\n| `$BPL_JVM_CDS_ENABLED`                | Deprecated, use `BPL_JVM_AOTCACHE_ENABLED`  - Whether to load the CDS caching file (`-XX:SharedArchiveFile=application.jsa`) that was generated during the CDS training run. Defaults to the value of `BP_JVM_CDS_ENABLED`                                                                                     |\n| `$BP_JVM_AOTCACHE_ENABLED`            | Whether to perform the AOT Cache training run (that will generate the caching file `application.jsa`). Defaults to false.                                                                                                 |\n| `$BPL_JVM_AOTCACHE_ENABLED`           | Whether to load the CDS caching file (`-XX:SharedArchiveFile=application.jsa`) that was generated during the CDS training run. Defaults to the value of `BP_JVM_CDS_ENABLED`                                             |\n| `$CDS_TRAINING_JAVA_TOOL_OPTIONS`     | Deprecated, use `TRAINING_RUN_JAVA_TOOL_OPTIONS`  - Allow the user to override the default `JAVA_TOOL_OPTIONS`, only for the CDS training run. Useful to configure your app not to reach external services during training run for example.                                                                          |\n| `$TRAINING_RUN_JAVA_TOOL_OPTIONS`     | Allow the user to override the default `JAVA_TOOL_OPTIONS`, only for training run. Useful to configure your app not to reach external services during training run for example.                                                                                |\n## Bindings\nThe buildpack optionally accepts the following bindings:\n\n### Type: `dependency-mapping`\n| Key                   | Value   | Description                                                                                       |\n| --------------------- | ------- | ------------------------------------------------------------------------------------------------- |\n| `\u003cdependency-digest\u003e` | `\u003curi\u003e` | If needed, the buildpack will fetch the dependency with digest `\u003cdependency-digest\u003e` from `\u003curi\u003e` |\n\n## License\nThis buildpack is released under version 2.0 of the [Apache License][a].\n\n[a]: http://www.apache.org/licenses/LICENSE-2.0\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaketo-buildpacks%2Fspring-boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaketo-buildpacks%2Fspring-boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaketo-buildpacks%2Fspring-boot/lists"}