I have setup a run configuration in eclipse but it's running in localhost:8080 but I want it to run in localhost:8080/demo/ but it's not working. I have attached the run configuration and application properties file
can anyone help me to run spring boot project in localhost:8080/demo/
CodePudding user response:
I think that you can just add this to your properties file
server.servlet.context-path=/demo
CodePudding user response:
In your controller by annotation @RequestMapping(path = "/demo")
or by annotation on method @GetMapping("/demo")