I\'ve been trying to find a way to set the context path for a webflux application. I know I can configure it using
server.servlet.context-path
You can use web Filter, as mentioned in above answers, but you can do one more thing. Write a Base Controller and Extend every class to that Base Controller. For example:
Base Controller.java
@RestController
@RequestMapping("/{base_url}")
public abstract class BaseController {
}
NewController.java
@RestController
public class NewController extends BaseController{
@Autowired
DatabaseClient databaseClient;
@GetMapping("/status")
public Mono
So now you can hit /{base_url}/status