I'm using spring-boot with web flux and have been trying to hit a basic get on postman which just is supposed to return a string but I'm getting an internal server error. I'm using IntelliJ. Also, no error in the console, and when I try to debug it doesn't get into any class. Below is the code I have:
@RestController
@RequestMapping("/home")
public class Controller {
@GetMapping
public Mono<String> printHome() {
return Mono.just("Welcome to Home");
}
}
Application.properties:
server.port=8080
spring.data.mongodb.database=home
spring.data.mongodb.port=27017
spring.data.mongodb.host=localhost
spring.main.web-application-type=none
@RestControlleron the class and@GetMapping("/home")on the method. Then calllocalhost:8080/homeon the browser - Felipespring.main.web-application-type=REACTIVEor complete remove that line from your config - Felipe