nginx配置spring mvc


spring mvc是没有后缀的,也就是

location ~ .(jsp|jspx|do)?$ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8080 ;
}

这样配置是不行的,求配置方法.

spring mvc 的请求路径大致是这样的:

http://localhost/login/

或者

http://localhost/login

需要转发到tomcat处理,等配置方法,谢谢

spring-mvc java nginx

恋loli 10 years, 4 months ago

我也遇到了这个问题,楼主现在解决了吗

暗暗的布丁 answered 9 years, 9 months ago

Your Answer