a-pavithraa/springboot-skills-marketplace / plugins/springboot-architecture/skills/creating-springboot-projects
creating-springboot-projects
VerifiedUse when starting a new Spring Boot project or service: scaffolding or bootstrapping a backend, REST API, microservice or modular monolith; choosing how to structure it (layered, package-by-module, modular monolith, tomato, DDD-hexagonal); selecting Spring Boot 4 features; generating the base project with progen or Spring Initializr; or applying the bundled templates and references in this skill. Not for migrating existing projects or for isolated JPA/repository work without broader project-creation context.
assets/resilience-service.java
View on GitHubpackage {{PACKAGE}}.{{MODULE}}.service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.resilience.annotation.ConcurrencyLimit;
import org.springframework.resilience.annotation.Retryable;
import org.springframework.stereotype.Service;
import java.util.Optional;
/**
* Native resiliency features in Spring Framework 7:
* - @Retryable - Automatic retry support (org.springframework.resilience.annotation)
* - @ConcurrencyLimit - Concurrency control and rate limiting
*
* Requires @EnableResilientMethods on @Configuration class.
* Circuit breaker requires Resilience4j (NOT native).
*
* Primary references (official):
* https://spring.io/blog/2025/09/09/core-spring-resilience-features/
* https://docs.spring.io/spring-framework/reference/core/resilience.html
* Community sample for additional patterns:
* https://github.com/sivaprasadreddy/spring-boot-4-features/tree/main/resilience-features
*/
@Service
public class {{NAME}}Service {
private static final Logger LOG = LoggerFactory.getLogger({{NAME}}Service.class);
private final {{NAME}}Client client;
public {{NAME}}Service({{NAME}}Client client) {
this.client = client;
}
// 1 initial attempt + maxRetries — up to 4 total invocations
@Retryable(
includes = {RuntimeException.class},
maxRetries = 3,
delay = 1000,
multiplier = 2
)
public Optional<{{NAME}}> getById(String id) {
LOG.info("Fetching by id: {}", id);
return client.getById(id);
}
@ConcurrencyLimit(2)
public void processSlowTask(String id) {
LOG.info("Processing slow task for id: {}", id);
sleep();
LOG.info("Done for id: {}", id);
}
private void sleep() {
try {
Thread.sleep(4000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
}
// ============================================================
// SUPPORTING TYPES (FROM THE REFERENCE REPO PATTERN)
// ============================================================
// package {{PACKAGE}}.{{MODULE}}.client;
//
// import org.springframework.web.bind.annotation.PathVariable;
// import org.springframework.web.service.annotation.GetExchange;
// import org.springframework.web.service.annotation.HttpExchange;
//
// import java.util.Optional;
//
// @HttpExchange
// public interface {{NAME}}Client {
// @GetExchange(url = "/api/{{MODULE}}/{id}")
// Optional<{{NAME}}> getById(@PathVariable String id);
// }
// package {{PACKAGE}}.{{MODULE}}.config;
//
// import org.springframework.context.annotation.Configuration;
// import org.springframework.web.service.registry.ImportHttpServices;
//
// @Configuration
// @ImportHttpServices(group = "{{name}}", types = {{NAME}}Client.class)
// public class {{NAME}}ClientConfig {
// }
// package {{PACKAGE}};
//
// import org.springframework.boot.autoconfigure.SpringBootApplication;
// import org.springframework.resilience.annotation.EnableResilientMethods;
//
// @SpringBootApplication
// @EnableResilientMethods // Required for @Retryable and @ConcurrencyLimit.
// // If an annotated class implements an interface, use proxyTargetClass = true:
// // the default JDK proxy never retries there (Framework 7.0.9). Calls from inside
// // the same class skip the proxy too; the harness's CodeRulesTests checks for them.
// public class {{NAME}}Application {
// }
// application.properties (from the reference repo):
// spring.http.serviceclient.default.base-url=http://localhost:8080
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |