且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

反向代理后面的Thymeleaf模板(在Spring Boot应用程序中)无法正确形成url

更新时间:2023-09-09 13:18:52

最终将Tomcat服务器的上下文与所需的Nginx位置进行匹配.根据上面的示例,上下文将设置为"/app".

Ended up matching the context of the Tomcat server to the desired Nginx location. According to above example, the context would be set to '/app'.

我在application.yml中设置了应用程序上下文属性:

I set the application context property in the application.yml:

server:
  servlet:
    contextPath: /app