I'm using Spring Boot to build a REST service. And this works perfectly.
I create a @Controller
, a @Service
and a @Repository
(JpaRepository) layer and a @Entity
domain class. So I have for example
- OrganisationController
- OrganisationService
- OrganisationRepository and
- Organisation (domain pojo)
With a few injections and configs I have my REST API GET /organisation/1
running. Nice!
But now, after using this strategy extensively I have the feeling this can be done more efficient. And probably Spring (Boot) has thought about this already.
I have worked with a good solution: HATEOAS (and HAL). However, I don't really like the complex hateoas json. I would like simple responses (without all the links, embeds and more). What is the best approach to accomplish this?
HATEOAS is pretty much what I need (just simple CRUD operations). I only need more control over the output.
btw: I prefer Java Config and annotations over XML.