mirror of
https://github.com/sanjeed5/awesome-cursor-rules-mdc.git
synced 2026-11-30 14:52:55 +08:00
rename folder
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
---
|
||||
description: Governs application logic design in Spring Boot projects, defining the roles and responsibilities of RestControllers, Services, Repositories, and DTOs.
|
||||
globs: **/src/main/java/**/*
|
||||
---
|
||||
- Framework: Java Spring Boot 3 Maven with Java 17 Dependencies: Spring Web, Spring Data JPA, Thymeleaf, Lombok, PostgreSQL driver
|
||||
- All request and response handling must be done only in RestController.
|
||||
- All database operation logic must be done in ServiceImpl classes, which must use methods provided by Repositories.
|
||||
- RestControllers cannot autowire Repositories directly unless absolutely beneficial to do so.
|
||||
- ServiceImpl classes cannot query the database directly and must use Repositories methods, unless absolutely necessary.
|
||||
- Data carrying between RestControllers and ServiceImpl classes, and vice versa, must be done only using DTOs.
|
||||
- Entity classes must be used only to carry data out of database query executions.
|
||||
Reference in New Issue
Block a user