本文整理汇总了Java中org.springframework.web.servlet.i18n.LocaleChangeInterceptor.setParamName方法的典型用法代码示例。如果您正苦于以下问题:Java LocaleChangeInterceptor.setParamName方法的具体用法?Java LocaleChangeInterceptor.setParamName怎么用?Java LocaleChangeInterceptor.setParamName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.web.servlet.i18n.LocaleChangeInterceptor
的用法示例。
在下文中一共展示了LocaleChangeInterceptor.setParamName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: localeChangeInterceptor
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@Bean
public LocaleChangeInterceptor localeChangeInterceptor() {
LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
lci.setParamName("lang");
return lci;
}
示例2: localeChangeInterceptor
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@RefreshScope
@Bean
public LocaleChangeInterceptor localeChangeInterceptor() {
final LocaleChangeInterceptor bean = new LocaleChangeInterceptor();
bean.setParamName(this.casProperties.getLocale().getParamName());
return bean;
}
示例3: localeChangeInterceptor
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@Bean
public LocaleChangeInterceptor localeChangeInterceptor() {
LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
// 参数名
lci.setParamName("lang");
return lci;
}
示例4: localeInterceptor
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
/**
* Set up locale configuration by url parameter
*
* @return
*/
@Bean
public LocaleChangeInterceptor localeInterceptor() {
LocaleChangeInterceptor interceptor = new LocaleChangeInterceptor();
interceptor.setParamName(LANG_PARAMETER_NAME);
return interceptor;
}
示例5: localeChangeInterceptor
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@RefreshScope
@Bean
public LocaleChangeInterceptor localeChangeInterceptor() {
LocaleChangeInterceptor bean = new LocaleChangeInterceptor();
bean.setParamName(this.casProperties.getLocale().getParamName());
return bean;
}
示例6: handlerMapping
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
/**
* The method handlerMapping is responsbile for creating and configuring the locale change interceptor
* @return A new request mapping handler mapping
*/
@Bean
public HandlerMapping handlerMapping() {
final LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("language");
final RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
requestMappingHandlerMapping.setInterceptors(new Object[] { localeChangeInterceptor });
return requestMappingHandlerMapping;
}
示例7: addInterceptors
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
/**
* Change Language from Url
*/
@Override
public void addInterceptors(InterceptorRegistry registry) {
LocaleChangeInterceptor interceptor = new LocaleChangeInterceptor();
interceptor.setParamName("language"); // Url to change url be ?language=en
registry.addInterceptor(interceptor);
}
示例8: addInterceptors
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@Override
public void addInterceptors(InterceptorRegistry registry) {
final LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("language");
registry.addInterceptor(localeChangeInterceptor);
}
示例9: addInterceptors
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
/**
* Interceptors
*/
@Override
public void addInterceptors(InterceptorRegistry registry) {
// Log HandlerInterceptor
LogInterceptor logInterceptor=new LogInterceptor();
logInterceptor.setSysLogService(sysLogService); // 手动注入
registry.addInterceptor(logInterceptor).addPathPatterns("/**");
// I18N HandlerInterceptor
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("lang");
registry.addInterceptor(localeChangeInterceptor).addPathPatterns("/**");
super.addInterceptors(registry);
}
示例10: addInterceptors
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@Override
public void addInterceptors(InterceptorRegistry registry) {
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("language");
registry.addInterceptor(localeChangeInterceptor);
}
示例11: addInterceptors
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@Override
public void addInterceptors(InterceptorRegistry registry) {
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("lang");
registry.addInterceptor(localeChangeInterceptor);
}
示例12: addInterceptors
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@Override
public void addInterceptors(InterceptorRegistry registry)
{
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("lang");
registry.addInterceptor(localeChangeInterceptor);
}
示例13: addInterceptors
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@Override
public void addInterceptors(InterceptorRegistry registry) {
LocaleChangeInterceptor localeInterceptor = new LocaleChangeInterceptor();
localeInterceptor.setParamName("lang");
localeInterceptor.setIgnoreInvalidLocale(true);
registry.addInterceptor(localeInterceptor);
}
示例14: localeChangeInterceptor
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@Bean
public LocaleChangeInterceptor localeChangeInterceptor()
{
LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
lci.setParamName("lang");
return lci;
}
示例15: addInterceptors
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@Override
public void addInterceptors(InterceptorRegistry registry) {
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("language");
registry.addInterceptor(localeChangeInterceptor);
}