且构网

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

Spring MVC默认的Locale和Locale更改不起作用

更新时间:2023-01-30 11:52:35

上面的配置在问题是对的。问题是在请求的页面集中作为web.xml文件中的欢迎页面,因此它在没有任何拦截器的情况下执行。

The above configuration in the question is correct. The problem was in the requested page sets as welcome page in web.xml file so it is executed without any interceptors.

在web中评论此部分后,每件事情都可以正常工作。 xml

Every thing works fine after comment this part in web.xml

<!--  <welcome-file-list>
		<welcome-file>/WEB-INF/pages/adminHome.jsp</welcome-file>
</welcome-file-list>-->