Spring Boot 3 Project ((top))
@RestController public class OrderController private final ObservationRegistry observationRegistry; @GetMapping("/order/id") public Order getOrder(@PathVariable Long id) return Observation.createNotStarted("order.fetch", observationRegistry) .observe(() -> fetchOrder(id));
Spring Boot 3 represents a significant evolution in the Java ecosystem, built on Spring Framework 6 and requiring
| Component | Minimum Version | |-----------|----------------| | Java | 17 (or 19/21 for LTS) | | Maven | 3.6+ | | Gradle | 7.5+ | | Tomcat (embedded) | 10.1 | | Jakarta EE | 9+ | spring boot 3 project
| Layer | Technology | Reason | | :--- | :--- | :--- | | Language | Java 21 (LTS) | Virtual Threads + Pattern Matching | | Framework | Spring Boot 3.2+ | Native support, Security 6 | | Database | PostgreSQL 15 | JSONB, robust | | Migration | Flyway 9+ | Version control DB schema | | Caching | Redis + @EnableCaching | Distributed cache | | Security | OAuth2 Resource Server | Stateless JWT | | Observability | Prometheus + Grafana + Tempo | Metrics + Traces | | Packaging | Docker + Jib | Distroless images | | CI/CD | GitHub Actions + Native Build | Fast deploys |
./target/boot3-demo
./mvnw spring-boot:run -Dspring-boot.run.profiles=dev
Gone are the days of package-by-layer ( controller , service , repository ). The modern recommendation is . This keeps related logic together, making the application modular. Run with jbang App
Run with jbang App.java .