Java Code Examples for org.springframework.web.servlet.config.annotation.InterceptorRegistry#addInterceptor()

The following examples show how to use org.springframework.web.servlet.config.annotation.InterceptorRegistry#addInterceptor() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AppConfig.java    From Mastering-Microservices-with-Java-Third-Edition with MIT License 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(localeChangeInterceptor());
}
 
Example 2
Source File: AppConfig.java    From Mastering-Microservices-with-Java-Third-Edition with MIT License 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(localeChangeInterceptor());
}
 
Example 3
Source File: LocaleConfiguration.java    From cubeai with Apache License 2.0 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
    localeChangeInterceptor.setParamName("language");
    registry.addInterceptor(localeChangeInterceptor);
}
 
Example 4
Source File: AppConfig.java    From Mastering-Microservices-with-Java-Third-Edition with MIT License 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(localeChangeInterceptor());
}
 
Example 5
Source File: LocaleConfiguration.java    From cubeai with Apache License 2.0 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
    localeChangeInterceptor.setParamName("language");
    registry.addInterceptor(localeChangeInterceptor);
}
 
Example 6
Source File: LocaleConfiguration.java    From flair-registry with Apache License 2.0 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
    localeChangeInterceptor.setParamName("language");
    registry.addInterceptor(localeChangeInterceptor);
}
 
Example 7
Source File: AppConfig.java    From Mastering-Microservices-with-Java-Third-Edition with MIT License 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
  registry.addInterceptor(localeChangeInterceptor());
}
 
Example 8
Source File: LocaleConfiguration.java    From cubeai with Apache License 2.0 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
    localeChangeInterceptor.setParamName("language");
    registry.addInterceptor(localeChangeInterceptor);
}
 
Example 9
Source File: AppConfig.java    From Mastering-Microservices-with-Java-Third-Edition with MIT License 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(localeChangeInterceptor());
}
 
Example 10
Source File: I18nConfig.java    From open-capacity-platform with Apache License 2.0 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(localeChangeInterceptor());
}
 
Example 11
Source File: I18nConfig.java    From supplierShop with MIT License 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry)
{
    registry.addInterceptor(localeChangeInterceptor());
}
 
Example 12
Source File: AppConfig.java    From Mastering-Microservices-with-Java-Third-Edition with MIT License 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(localeChangeInterceptor());
}
 
Example 13
Source File: AppConfig.java    From Mastering-Microservices-with-Java-Third-Edition with MIT License 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(localeChangeInterceptor());
}
 
Example 14
Source File: AppConfig.java    From Mastering-Microservices-with-Java-Third-Edition with MIT License 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(localeChangeInterceptor());
}
 
Example 15
Source File: ResourceServerAutoConfiguration.java    From authmore-framework with Apache License 2.0 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(new ResourceServerInterceptor(resourceProperties));
}
 
Example 16
Source File: LocaleConfiguration.java    From cubeai with Apache License 2.0 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
    localeChangeInterceptor.setParamName("language");
    registry.addInterceptor(localeChangeInterceptor);
}
 
Example 17
Source File: AppConfig.java    From Mastering-Microservices-with-Java-Third-Edition with MIT License 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(localeChangeInterceptor());
}
 
Example 18
Source File: RegInterceptor.java    From springboot-link-admin with Apache License 2.0 4 votes vote down vote up
@Override
public void addInterceptors(InterceptorRegistry registry) {
	registry.addInterceptor(appContextInterceptor);
}
 
Example 19
Source File: FebsCloudSecurityInteceptorConfigure.java    From FEBS-Cloud with Apache License 2.0 4 votes vote down vote up
@Override
@SuppressWarnings("all")
public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(febsServerProtectInterceptor());
}
 
Example 20
Source File: WebMvcConfig.java    From yue-library with Apache License 2.0 2 votes vote down vote up
/**
 * 注册自定义拦截器,添加拦截路径和排除拦截路径
 * <p>
 * addPathPatterns("/**") 表示拦截所有的请求。<br>
 * excludePathPatterns("/login", "/register") 表示除了登陆与注册之外,因为登陆注册不需要登陆也可以访问。<br>
 * 这里可以添加多个拦截器
 */
@Override
public void addInterceptors(InterceptorRegistry registry) {
	registry.addInterceptor(new HttpRequestInterceptor());
	WebMvcConfigurer.super.addInterceptors(registry);
}