problem description
online tutorials are usually modified like www.xxx.com/index?lang=zh-CN.
I want to make it like https://msdn.microsoft.com/zh..
wants to avoid modifying the original controller as much as possible.
online tutorials are usually modified like www.xxx.com/index?lang=zh-CN.
I want to make it like https://msdn.microsoft.com/zh..
wants to avoid modifying the original controller as much as possible.
you can write an interceptor to modify the internationalized language
by determining whether the last path of the url is zh-cn
, and then modifying the language
in fact, spring's original way to modify the language is to use the interceptor's
you can see its org.springframework.web.servlet.i18n.LocaleChangeInterceptor
source code to know
Previous: Php same key value pair array merge
Next: The nuxt project runs the error SyntaxError: Unexpected token import on the new computer.