Simple groovy Spring REST example with spock test
What's inside ?
- Rest controller wiht @RestController
- Spring data repository
- JPA entity
- @ControllerAdvice example with custom made exception, JSON return message and chosen HTTP status
- MockMvc usage with Spock Framework (test @ControllerAdvise)
All in groovy, in a SpringBoot application with gradle