java-patterns

Solid

Java: Spring Boot, CompletableFuture, records, sealed types, JPA/Hibernate, virtual threads. Triggers: Java, Spring, JPA, Hibernate, Maven, Gradle, virtual thread, sealed class.

AI & Automation 155 stars 19 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 93/100

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

Skill Content

# Java Patterns Skill ## Project Structure ### Maven / Gradle Standard Layout ``` my-app/ ├── pom.xml (or build.gradle.kts + settings.gradle.kts) ├── src/ │ ├── main/ │ │ ├── java/com/example/myapp/ │ │ │ ├── MyApplication.java │ │ │ ├── config/ │ │ │ ├── controller/ │ │ │ ├── service/ │ │ │ ├── repository/ │ │ │ ├── model/ │ │ │ │ ├── entity/ │ │ │ │ └── dto/ │ │ │ └── exception/ │ │ └── resources/ │ │ ├── application.yml │ │ └── db/migration/ │ └── test/ │ ├── java/com/example/myapp/ │ └── resources/application-test.yml └── target/ (or build/) ``` ### Multi-Module ``` parent/ ├── pom.xml (packaging=pom) ├── common/ (shared utilities) ├── domain/ (entities, business rules) ├── api/ (REST controllers, DTOs) └── app/ (Spring Boot main, wiring) ``` --- ## Idioms / Code Style ### Records (Java 16+) ```java public record UserDto(Long id, String name, String email) { public UserDto { // compact constructor for validation Objects.requireNonNull(name, "name must not be null"); Objects.requireNonNull(email, "email must not be null"); } } ``` ### Sealed Classes (Java 17+) ```java public sealed interface Shape permits Circle, Rectangle, Triangle { double area(); } public record Circle(double radius) implements Shape { public double area() { return Math.PI * radius * radius; } } ...

Details

Author
softspark
Repository
softspark/ai-toolkit
Created
2 months ago
Last Updated
2 days ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category