Add composable Spring Boot micro-templates
- Dominant language
- Go
- Stars
- 569
- Forks
- 364
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 136
Description
Add extension-owned Spring Boot micro-templates to `azure.springboot`. Developers should be able to add a new Spring Boot service to an existing azd project through the standard `azd add` experience, with the application code, project definition, infrastructure, and service relationships placed in a dedicated layer.
These micro-templates should use the layered provisioning and micro-template capabilities tracked by [#9765](https://github.com/Azure/azure-dev/issues/9765). They should create ordinary Spring Boot projects that remain understandable and usable without the extension, while using `azure.springboot` to provide detection, configuration mapping, and deployment through standard azd workflows.
We need to:
- Implement all Spring Boot micro-templates in `cli/azd/extensions/azure.springboot/`.
- Contribute the micro-templates through the standard `azd add` experience.
- Provide initial Maven-based micro-templates for:
- A minimal REST API
- A REST API using PostgreSQL
- A message producer and consumer using Azure Service Bus
- A web application using Azure Storage
- A web application using Azure Key Vault
- Generate conventional Spring Boot project structures and `pom.xml` files.
- Use supported Java, Spring Boot, and Spring Cloud Azure versions.
- Include only the dependencies required by the selected micro-template.
- Use `DefaultAzureCredential` locally and managed identity after deployment.
- Use passwordless Azure service connections.
- Add the application, its infrastructure, and its relationships as a dedicated project layer.
- Compose with the resource micro-templates already provided by `azure.springboot` rather than duplicating their infrastructure.
- Support adding a Spring Boot service to an existing non-Spring azd project.
- Support adding multiple Spring Boot services without service, path, layer, input, or output collisions.
- Derive deterministic default service and layer names while allowing the developer to override them through the standard `azd add` experience.
- Preserve existing project files and configuration.
- Detect conflicts before writing files and fail without leaving a partially applied micro-template.
- Ensure generated projects work with normal Maven commands independently of azd.
- Ensure generated projects are recognized by the extension’s Maven detection and project translation implementations.
- Ensure generated services deploy to Azure Container Apps through the standard `azd up` workflow.
- Include Actuator health endpoints and configuration appropriate for the selected micro-template.
- Include tests that verify generated projects build successfully.
- Add tests that apply each micro-template to empty and existing azd projects.
- Add tests covering repeated additions, naming conflicts, path conflicts, failed composition, and rollback behavior.
- Add end-to-end coverage that uses `azd add` followed by `azd up` for each initial micro-template.
- Document the available micro-templates, generated files, dependencies, Azure resources, local-development workflow, and customization points in `cli/azd/extensions/azure.springboot/README.md`.
- Link this issue as blocked by:
- [#9767](https://github.com/Azure/azure-dev/issues/9767) for layer-aware extension APIs
- [#9770](https://github.com/Azure/azure-dev/issues/9770) for extension-contributed `azd add` items
- [#9768](https://github.com/Azure/azure-dev/issues/9768) for complete micro-template composition
- The `azure.springboot` extension foundation issue
- The Spring Boot project detection and translation issues
- The Azure Container Apps deployment issue
- The composable Azure resource micro-templates issue
## Boundaries
- Do not add Spring-specific commands or verbs.
- Do not add an `azd spring` command namespace.
- Do not add an extension-specific alternative to `azd add`.
- Do not modify azd core behavior, layered provisioning, or micro-template composition.
- Do not add these micro-templates to azd’s built-in template catalog.
- Do not generate custom application frameworks or nonstandard Spring project layouts.
- Do not overwrite existing source files, build files, or application configuration.
- Do not generate passwords, connection strings, access keys, or other long-lived credentials.
- Do not include every supported Azure integration in the initial micro-template set.
- Do not add Gradle micro-templates in this issue.
- Do not add App Service, AKS, Azure Functions, Azure Red Hat OpenShift, or VM-specific micro-templates.
- Do not target Azure Spring Apps.
- If the extension framework cannot contribute or compose these micro-templates through standard `azd` workflows, file the gap against the appropriate core epic rather than adding a workaround, parallel command, or core change in this issue.
Contributor guide
Research direction
Start by reviewing the blocked issues for layer-aware APIs, extension-contributed azd add items, composition, detection, translation, and deployment. Then inspect cli/azd/extensions/azure.springboot/ and its README.md to map the required Maven micro-templates and standard azd add/up flow. Done means the listed templates, composition and rollback tests, end-to-end coverage, and documentation are complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go, java, spring-boot
- Domain
- build-system, cli, cloud, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100