Examples of LocaleChangeInterceptor


Examples of org.springframework.web.servlet.i18n.LocaleChangeInterceptor

    HandlerExecutionChain chain = mapping.getHandler(request);
    assertEquals(3, chain.getInterceptors().length);
    assertTrue(chain.getInterceptors()[0] instanceof ConversionServiceExposingInterceptor);
    assertTrue(chain.getInterceptors()[1] instanceof LocaleChangeInterceptor);
    assertTrue(chain.getInterceptors()[2] instanceof ThemeChangeInterceptor);
    LocaleChangeInterceptor interceptor = (LocaleChangeInterceptor) chain.getInterceptors()[1];
    assertEquals("lang", interceptor.getParamName());
    ThemeChangeInterceptor interceptor2 = (ThemeChangeInterceptor) chain.getInterceptors()[2];
    assertEquals("style", interceptor2.getParamName());
  }
View Full Code Here

Examples of org.springframework.web.servlet.i18n.LocaleChangeInterceptor

  private final AntPathMatcher pathMatcher = new AntPathMatcher();

  @Before
  public void setup() {
    this.interceptor = new LocaleChangeInterceptor();
  }
View Full Code Here

Examples of org.springframework.web.servlet.i18n.LocaleChangeInterceptor

      configurer.setUrlPathHelper(new TestPathHelper());
    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
      registry.addInterceptor(new LocaleChangeInterceptor());
    }
View Full Code Here

Examples of org.springframework.web.servlet.i18n.LocaleChangeInterceptor

  public void setup() {
    CookieLocaleResolver localeResolver = new CookieLocaleResolver();
    localeResolver.setCookieDomain("domain");

    this.mockMvc = standaloneSetup(new SimpleController())
        .addInterceptors(new LocaleChangeInterceptor())
        .setLocaleResolver(localeResolver)
        .defaultRequest(get("/").param("locale", "en_US"))
        .alwaysExpect(status().isOk())
        .build();
  }
View Full Code Here

Examples of org.springframework.web.servlet.i18n.LocaleChangeInterceptor

  }

  @Bean
  public LocaleChangeInterceptor localeChangeInterceptor() {
    log.debug("Configuring localeChangeInterceptor");
    LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
    localeChangeInterceptor.setParamName("language");
    return localeChangeInterceptor;
  }
View Full Code Here

Examples of org.springframework.web.servlet.i18n.LocaleChangeInterceptor

  }

  @Bean
  public LocaleChangeInterceptor localeChangeInterceptor() {
    log.debug("Configuring localeChangeInterceptor");
    LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
    localeChangeInterceptor.setParamName("language");
    return localeChangeInterceptor;
  }
View Full Code Here

Examples of org.springframework.web.servlet.i18n.LocaleChangeInterceptor

  }

  @Bean
  public LocaleChangeInterceptor localeChangeInterceptor() {
    log.debug("Configuring localeChangeInterceptor");
    LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
    localeChangeInterceptor.setParamName("language");
    return localeChangeInterceptor;
  }
View Full Code Here

Examples of org.springframework.web.servlet.i18n.LocaleChangeInterceptor

  }

  @Bean
  public LocaleChangeInterceptor localeChangeInterceptor() {
    log.debug("Configuring localeChangeInterceptor");
    LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
    localeChangeInterceptor.setParamName("language");
    return localeChangeInterceptor;
  }
View Full Code Here

Examples of org.springframework.web.servlet.i18n.LocaleChangeInterceptor

    }

    @Bean
    public LocaleChangeInterceptor localeChangeInterceptor() {
        log.debug("Configuring localeChangeInterceptor");
        LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
        localeChangeInterceptor.setParamName("language");
        return localeChangeInterceptor;
    }
View Full Code Here

Examples of org.springframework.web.servlet.i18n.LocaleChangeInterceptor

  }
 
  @Override
  public void addInterceptors(InterceptorRegistry registry) {

    LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
    localeChangeInterceptor.setParamName("lang");
    registry.addInterceptor(localeChangeInterceptor);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.