springboot-patterns

Solid

Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work.

AI & Automation 8 stars 0 forks Updated today MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
32
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Spring Boot Development Patterns Spring Boot architecture and API patterns for scalable, production-grade services. ## When to Activate - Building REST APIs with Spring MVC or WebFlux - Structuring controller → service → repository layers - Configuring Spring Data JPA, caching, or async processing - Adding validation, exception handling, or pagination - Setting up profiles for dev/staging/production environments - Implementing event-driven patterns with Spring Events or Kafka ## REST API Structure ```java @RestController @RequestMapping("/api/markets") @Validated class MarketController { private final MarketService marketService; MarketController(MarketService marketService) { this.marketService = marketService; } @GetMapping ResponseEntity<Page<MarketResponse>> list( @RequestParam(defaultValue = "0") int page, @RequestParam(defaultValue = "20") int size) { Page<Market> markets = marketService.list(PageRequest.of(page, size)); return ResponseEntity.ok(markets.map(MarketResponse::from)); } @PostMapping ResponseEntity<MarketResponse> create(@Valid @RequestBody CreateMarketRequest request) { Market market = marketService.create(request); return ResponseEntity.status(HttpStatus.CREATED).body(MarketResponse.from(market)); } } ``` ## Repository Pattern (Spring Data JPA) ```java public interface MarketRepository extends JpaRepository<MarketEntity, Long> { @Query("select m from MarketEntity m where m.status = :status ord...

Details

Author
jdanigo
Repository
jdanigo/hydraia
Created
1 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category