From spring
Build Spring Boot applications with bootstrap, starter selection, externalized configuration, configuration properties, test strategy, Actuator, and packaging. Use this skill when the task is about Spring Boot application bootstrap, starter selection, externalized configuration, configuration properties, test strategy, Actuator operations, packaging, or Boot-level runtime wiring.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spring:spring-bootThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill when the task is about Spring Boot application bootstrap, starter selection, externalized configuration, configuration properties, test strategy, Actuator operations, packaging, or Boot-level runtime wiring.
references/aot-processing.mdreferences/application-context-runner.mdreferences/autoconfiguration-diagnostics.mdreferences/buildpacks.mdreferences/config-data-order.mdreferences/configuration-properties-binding.mdreferences/docker-compose-local-wiring.mdreferences/dockerfiles.mdreferences/endpoint-exposure.mdreferences/health-groups.mdreferences/layered-jars.mdreferences/metrics.mdreferences/native-image.mdreferences/probes.mdreferences/profile-activation.mdreferences/property-precedence.mdreferences/sanitization.mdreferences/service-connections.mdreferences/testcontainers.mdreferences/tracing.mdUse this skill when the task is about Spring Boot application bootstrap, starter selection, externalized configuration, configuration properties, test strategy, Actuator operations, packaging, or Boot-level runtime wiring.
Use spring-boot for Boot application structure, starter selection, auto-configuration usage, properties binding, profiles and config data, test strategy, Actuator, and packaging choices.
The ordinary Spring Boot job is:
@ConfigurationProperties.@Value usage for durable settings.@SpringBootTest.Use Boot dependency management and only the starters the application actually needs.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>4.0.5</version>
<relativePath/>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
@Bean
ApplicationRunner warmupRunner(CacheWarmupService warmupService) {
return args -> warmupService.warm();
}
Use ApplicationRunner or CommandLineRunner for startup tasks that belong to the application lifecycle rather than bean construction.
@Validated
@ConfigurationProperties("catalog")
public record CatalogProperties(@NotBlank String region, int pageSize) {
}
spring:
config:
activate:
on-profile: prod
catalog:
region: eu-west-1
management:
endpoints:
web:
exposure:
include: health,info
Keep one local run path and one packaged run path explicit.
./mvnw spring-boot:run
java -jar target/app.jar
If the deployment baseline is container-native, keep the image build path explicit as a conditional branch rather than as an implicit default.
@SpringBootApplication.@ConfigurationProperties for durable settings and reserve @Value for narrow one-off expressions.Choose the narrowest Boot test that proves the behavior.
| Need | Start here |
|---|---|
| MVC controller behavior | @WebMvcTest |
| data repository behavior | repository or slice test |
| full application integration | @SpringBootTest |
@RestController
@RequestMapping("/api/greetings")
class GreetingController {
@GetMapping
Map<String, String> greet(@RequestParam(defaultValue = "world") String name) {
return Map.of("message", "Hello " + name);
}
}
@WebMvcTest(GreetingController.class)
class GreetingControllerTests {
@Autowired
MockMvc mvc;
@Test
void greeting() throws Exception {
mvc.perform(get("/api/greetings").param("name", "Spring"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.message").value("Hello Spring"));
}
}
Open references/application-context-runner.md when the blocker is Boot wiring without starting the whole application, and open references/testcontainers.md or references/service-connections.md when tests need real local services.
Return:
@ConfigurationProperties binding behavior.spring.docker.compose.* wiring.npx claudepluginhub ririnto/sinon --plugin springGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.