java - springboot deployed to tomcat url request path problem
漂亮男人
漂亮男人 2017-05-17 10:04:07
0
1
497

1. Springboot local development, context-path: /hbgj/ homepage access /hbgj/v1/index, another post request is ajax access url is /v1/dayJob, all are normal
2. Pack the war package into tomcat. The package name is hbgj.war. Visit hbgj/v1/index on the homepage. The request for the other two posts is still /v1/dayJob without modification, and 404 is displayed. This request is written in a separate js file
3. There is another form submission that is also normal th:action="@{/v1/fuzzy}" method="GET"

Could you please tell me how you usually deal with this situation and ensure that the development method is consistent with the formal environment

漂亮男人
漂亮男人

reply all(1)
洪涛

youjs中的请求没有带contextpath

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template