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
you
js
中的请求没有带contextpath