Generate an application from https://start.spring.io/
- Under Java use a modern version such as 11+
- Add Dependencies
- Spring Reactive Web
- Spring HATEOAS
- (optional) Spring Boot DevTools
You can go directly to this link.
Download the application, unzip, and open in your IDE.
In src/main/resources/application.properties add:
spring.main.web-application-type=reactive
Add the following bean somewhere in your app:
@Bean
public ForwardedHeaderTransformer forwardedHeaderTransformer() {
return new ForwardedHeaderTransformer();
}Separate the POJO (which is likely connected to the database) from the model assemblers.
See this link for details.
For further reference, please consider the following sections:
