session.setAttribute(UserAttributes.NAME, userAttrs);
}
String langCode = request.getParameter(this.languageParam);
if (langCode != null) {
LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request);
if (localeResolver == null) {
throw new IllegalStateException("No LocaleResolver found: not in a DispatcherServlet request?");
}
Locale locale = StringUtils.parseLocaleString(langCode);
localeResolver.setLocale(request, response, locale);
Language language = languageService.getByCode(langCode);
if(language!=null){
userAttrs.setLanguageId(language.getId());
locale = language.getLocale();