當前位置: 首頁>>代碼示例>>Java>>正文


Java SessionLocaleResolver.setDefaultLocale方法代碼示例

本文整理匯總了Java中org.springframework.web.servlet.i18n.SessionLocaleResolver.setDefaultLocale方法的典型用法代碼示例。如果您正苦於以下問題:Java SessionLocaleResolver.setDefaultLocale方法的具體用法?Java SessionLocaleResolver.setDefaultLocale怎麽用?Java SessionLocaleResolver.setDefaultLocale使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.springframework.web.servlet.i18n.SessionLocaleResolver的用法示例。


在下文中一共展示了SessionLocaleResolver.setDefaultLocale方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: localeResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
    SessionLocaleResolver bean = new SessionLocaleResolver();
    String locale = this.casProperties.getLocale().getDefaultValue();
    this.log.debug("Setting default locale to [{}]", locale);
    bean.setDefaultLocale(new Locale(locale));
    return bean;
}
 
開發者ID:e-gov,項目名稱:TARA-Server,代碼行數:9,代碼來源:CasWebAppConfiguration.java

示例2: localeResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
    SessionLocaleResolver slr = new SessionLocaleResolver();
    // 默認語言
    slr.setDefaultLocale(Locale.CHINA);
    return slr;
}
 
開發者ID:kawhii,項目名稱:wolf,代碼行數:8,代碼來源:LocaleConfig.java

示例3: localeResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
/**
 * Set the LocaleResolver for the GUI portion of the application
 * By default english pages with be returned to the user
 * @return LocaleResolver
 */
@Bean
public LocaleResolver localeResolver() {
    SessionLocaleResolver slr = new SessionLocaleResolver();
    slr.setDefaultLocale(Locale.US);
    return slr;
}
 
開發者ID:HiOA-ABI,項目名稱:nikita-noark5-core,代碼行數:12,代碼來源:AppWebMvcConfiguration.java

示例4: sessionLocaleResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
/**
 * Session locale resolver.
 *
 * @return the session locale resolver
 */
@Bean(name = "localeResolver")
public SessionLocaleResolver sessionLocaleResolver() {
	SessionLocaleResolver localeResolver = new SessionLocaleResolver();
	localeResolver.setDefaultLocale(new Locale("ru"));

	return localeResolver;
}
 
開發者ID:gleb619,項目名稱:hotel_shop,代碼行數:13,代碼來源:TestConfig.java

示例5: localeResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
    final SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
    sessionLocaleResolver.setDefaultLocale(Locale.ENGLISH);

    return sessionLocaleResolver;
}
 
開發者ID:hpe-idol,項目名稱:find,代碼行數:8,代碼來源:AppConfiguration.java

示例6: localeResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
@Override
public LocaleResolver localeResolver() {
	SessionLocaleResolver slr = new SessionLocaleResolver();
	slr.setDefaultLocale(new Locale("pt-BR"));
	return slr;
}
 
開發者ID:mv-informatica,項目名稱:components-html5,代碼行數:8,代碼來源:WebConfig.java

示例7: localeResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
LocaleResolver localeResolver(){
    SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
    sessionLocaleResolver.setDefaultLocale(Locale.US);
    return sessionLocaleResolver;
}
 
開發者ID:WickedWitchWarsaw,項目名稱:ThymeleafSpringDemo,代碼行數:7,代碼來源:I18NConfig.java

示例8: localeResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
	SessionLocaleResolver slr = new SessionLocaleResolver();
	slr.setDefaultLocale(Locale.US);
	return slr;
}
 
開發者ID:xabgesagtx,項目名稱:fat-lining,代碼行數:7,代碼來源:FatLiningApplication.java

示例9: localeResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
    final SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
    sessionLocaleResolver.setDefaultLocale(Locale.US);
    return sessionLocaleResolver;
}
 
開發者ID:osiegmar,項目名稱:setra,代碼行數:7,代碼來源:WebConfig.java

示例10: localeResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
    SessionLocaleResolver slr = new SessionLocaleResolver();
    slr.setDefaultLocale(new Locale("et"));
    return slr;
}
 
開發者ID:TulevaEE,項目名稱:onboarding-service,代碼行數:7,代碼來源:LocalizationConfiguration.java

示例11: localeResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
	SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
	sessionLocaleResolver.setDefaultLocale(Locale.US);
	return sessionLocaleResolver;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Spring-5.0,代碼行數:7,代碼來源:Application.java

示例12: localeResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
	SessionLocaleResolver slr = new SessionLocaleResolver();
	slr.setDefaultLocale(Locale.forLanguageTag("en"));
	return slr;
}
 
開發者ID:petabyte-research,項目名稱:redflags,代碼行數:7,代碼來源:I18N.java

示例13: localResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localResolver(){
    SessionLocaleResolver bean = new SessionLocaleResolver();
    bean.setDefaultLocale(Locale.ENGLISH);
    return bean;
}
 
開發者ID:dovier,項目名稱:coj-web,代碼行數:7,代碼來源:WebConfiguration.java

示例14: sessionLocaleResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public SessionLocaleResolver sessionLocaleResolver(){
    SessionLocaleResolver localeResolver=new SessionLocaleResolver();
    localeResolver.setDefaultLocale(Locale.US);
    return localeResolver;
}
 
開發者ID:matheusmessora,項目名稱:nursery,代碼行數:7,代碼來源:WebMvcBoot.java

示例15: localeResolver

import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public SessionLocaleResolver localeResolver() {
    SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
    sessionLocaleResolver.setDefaultLocale(Locale.ENGLISH);
    return sessionLocaleResolver;
}
 
開發者ID:rtatol,項目名稱:spring-boot-thymeleaf-jpa,代碼行數:7,代碼來源:Application.java


注:本文中的org.springframework.web.servlet.i18n.SessionLocaleResolver.setDefaultLocale方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。