I am working on my first spring project, at the moment I can still manage the project but I think when I am going to add more controllers and entities I am going to lose the overview.
In this answer I saw that I should split it up https://stackoverflow.com/a/12399383/2735398
But I am still curious, is there an structure standard? I normally work in Laravel, here is the structure already predefined, and to find, create or delete a model you only need only class. In Spring I need for example an User Entity, Service and a Repository. So I already have 3 times as many files for each table.
The application is just an API. So I don't use any templates(Maybe later for mail).
At the moment I have these folders:
config package: This contains all the class with the @Configuration Annotation, like the websocket config and the interceptor registration.
controllers package: This contains all the controllers.
database package: This contains all the Services and repositories to get entities.
entities package: This contains all the entities.
interceptors package: This contains all the interceptors
services package: This contains all the self made services that can be injected, like a AuthService
.
validation package: This contains all request validation, for example is the password long enough.