當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。