src/
└── main/
├── java/
│ └── com/
│ └── yourcompany/
│ └── yourapp/
│ ├── YourAppApplication.java # Main class (entry point)
│ │
│ ├── config/ # Configuration classes (e.g. WebSecurityConfig)
│ ├── controller/ # REST Controllers (@RestController)
│ ├── dto/ # Data Transfer Objects
│ ├── entity/ # JPA Entities (@Entity)
│ ├── exception/ # Custom exceptions & handlers
│ ├── repository/ # Spring Data Repositories (@Repository)
│ ├── service/ # Business logic layer (@Service)
│ └── util/ # Utility/helper classes
│
└── resources/
├── application.yml # Configuration file (or .properties)
├── static/ # Static assets (HTML, CSS, JS if needed)
├── templates/ # Thymeleaf or other templates (if needed)
└── db/
└── migration/ # Flyway or Liquibase SQL migrations
cd src/main/java/com/yourcompany/yourapp/
mkdir -p {config,controller,dto,entity,exception,repository,service,util}
Top comments (0)