When implementing projects in Spring Boot (especially CRUD applications), I often find myself writing a lot of repetitive code that just calls functions and services from lower layers. For example, when implementing a web service with some REST API, you end up with a controller, a service, a repository, and a model for each feature. This is the recommended structure of Spring Boot projects. In most cases, the model is specific to the feature. The repository then implements basic methods to access and modify the data (for example, CrudRepository), together with some custom queries. The service calls the functions of the repository and adds some custom logic on top. However, it is often the case that the service mimics the functionality of the repository (get, search, list, ...). The controller is again quite similar to the service. It might handle the parsing of the parameters and could be used to enforce access control. Then, it forwards the call to the underlying service. So, custom logic is implemented in the service and (to some extent) in the repository. But in CRUD applications, often there is not a lot of custom logic, and in these cases, I find repetitive code bothersome. Especially when changing something in the model, as this requires adjusting the code in all four layers.
Now, my question. Is this a common problem? Can I circumvent it somehow? Would Spring Data REST go in the right direction? Are there code generators that can help?