...
- Web Layer (Controller, Exception handler, Mappers) - receive the request and send the response to the client.
- Service Layer - Business logic
- Repository Layer (Repository Interfaces & custom Repositories) - DB interaction at the lowest level
CPS have four layers of architecture and the 'Persistence Layer' was introduced to have loose coupling with DB. It gives an ability to move to another type of DB with little change.
...