|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
package cokr.xit.foundation.boot;
|
|
|
|
|
|
|
|
|
|
import java.util.Locale;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
@ -11,6 +13,7 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
|
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
|
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
|
|
|
|
|
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
|
|
|
|
|
import org.springframework.web.servlet.view.BeanNameViewResolver;
|
|
|
|
|
import org.springframework.web.servlet.view.JstlView;
|
|
|
|
@ -67,6 +70,16 @@ public class MvcConfig implements WebMvcConfigurer {
|
|
|
|
|
registry.addInterceptor(accessInitializer()).addPathPatterns(URL_PATTERNS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**SessionLocaleResolver를 반환한다.
|
|
|
|
|
* @return SessionLocaleResolver
|
|
|
|
|
*/
|
|
|
|
|
@Bean
|
|
|
|
|
public SessionLocaleResolver localeResolver() {
|
|
|
|
|
SessionLocaleResolver bean = new SessionLocaleResolver();
|
|
|
|
|
bean.setDefaultLocale(Locale.getDefault());
|
|
|
|
|
return bean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**BeanNameViewResolver를 반환한다.
|
|
|
|
|
* @return BeanNameViewResolver
|
|
|
|
|
*/
|
|
|
|
|