本文整理匯總了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);
}