更新时间:2022-12-04 15:56:01
如果您使用的是spring security
,请将您的LocaleChangeInterceptor放入mvc中:拦截器标记如
In case you are using spring security put your LocaleChangeInterceptor inside mvc:interceptors tag like
<mvc:interceptors>
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
<property name="paramName" value="language" />
</bean>
</mvc:interceptors>
并从配置中删除handlerMapping bean。希望它能正常工作。
and remove handlerMapping bean from configuration.Hope it will work.