Spring Boot application gives 404 when deployed to Tomcat but works with embedded server

后端 未结 3 977
温柔的废话
温柔的废话 2021-01-31 08:50

Guided by Serving Web Content with Spring MVC, I\'m creating a Spring Boot web application that I can run using both the embedded Tomcat instance as well as on a standalone Tomc

3条回答
  •  失恋的感觉
    2021-01-31 08:50

    Just add the route in the controller annotation, something like this: @RestController @RequestMapping(value = "/")

提交回复
热议问题