Advertisement
pperez_awto

InterceptorConfig

Mar 20th, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1. package cl.awto.microservice.poinvoice.interceptor.handler;
  2.  
  3. import org.springframework.context.annotation.Configuration;
  4. import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
  5. import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
  6.  
  7. @Configuration
  8. public class InterceptorConfig implements WebMvcConfigurer {
  9.  
  10.     private SecurityInterceptor securityInterceptor;
  11.  
  12.     public InterceptorConfig(SecurityInterceptor securityInterceptor) {
  13.         this.securityInterceptor = securityInterceptor;
  14.     }
  15.  
  16.     @Override
  17.     public void addInterceptors(InterceptorRegistry registry) {
  18.         registry.addInterceptor(securityInterceptor);
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement