当前位置: 首页>>代码示例>>Java>>正文


Java LocaleChangeInterceptor.setParamName方法代码示例

本文整理汇总了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;
}
 
开发者ID:chen0040,项目名称:spring-boot-slingshot,代码行数:8,代码来源:WebMvcConfig.java

示例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;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:CasManagementWebAppConfiguration.java

示例3: localeChangeInterceptor

import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@Bean
public LocaleChangeInterceptor localeChangeInterceptor() {
    LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
    // 参数名
    lci.setParamName("lang");
    return lci;
}
 
开发者ID:kawhii,项目名称:wolf,代码行数:8,代码来源:LocaleConfig.java

示例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;
}
 
开发者ID:remipassmoilesel,项目名称:simple-hostel-management,代码行数:12,代码来源:SpringConfiguration.java

示例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;
}
 
开发者ID:e-gov,项目名称:TARA-Server,代码行数:8,代码来源:CasWebflowContextConfiguration.java

示例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;
}
 
开发者ID:castlemock,项目名称:castlemock,代码行数:13,代码来源:MvcConfig.java

示例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);
}
 
开发者ID:giovannicandido,项目名称:generator-spring-spa,代码行数:10,代码来源:WebMvcConfig.java

示例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);
}
 
开发者ID:sanketbajoria,项目名称:jittrackGTS,代码行数:8,代码来源:LocaleConfiguration.java

示例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);
}
 
开发者ID:ushelp,项目名称:EasyEE,代码行数:18,代码来源:InterceptorConfiguration.java

示例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);
}
 
开发者ID:obiba,项目名称:agate,代码行数:8,代码来源:LocaleConfiguration.java

示例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);
}
 
开发者ID:jkardynia,项目名称:mvc-spring-hibernate,代码行数:8,代码来源:WebConfig.java

示例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);
}
 
开发者ID:huangye177,项目名称:spring4probe,代码行数:9,代码来源:WebConfig.java

示例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);
}
 
开发者ID:JakduK,项目名称:jakduk-api,代码行数:9,代码来源:MvcConfig.java

示例14: localeChangeInterceptor

import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; //导入方法依赖的package包/类
@Bean
public LocaleChangeInterceptor localeChangeInterceptor()
{
    LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
    lci.setParamName("lang");
    return lci;
}
 
开发者ID:osmmosques,项目名称:osm-mosques,代码行数:8,代码来源:Application.java

示例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);
}
 
开发者ID:pascalgrimaud,项目名称:qualitoast,代码行数:7,代码来源:LocaleConfiguration.java


注:本文中的org.springframework.web.servlet.i18n.LocaleChangeInterceptor.setParamName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。