zhenghaoyu
8 months ago
1 changed files with 24 additions and 0 deletions
@ -0,0 +1,24 @@
|
||||
package com.logpm.warehouse.config; |
||||
|
||||
import com.logpm.warehouse.config.interceptor.LocalServerLoginAccountsInterceptor; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.redis.cache.BladeRedis; |
||||
import org.springframework.context.annotation.Configuration; |
||||
import org.springframework.core.env.Environment; |
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
||||
|
||||
@Configuration |
||||
@AllArgsConstructor |
||||
public class InterceptorAdapterConfig implements WebMvcConfigurer { |
||||
|
||||
private final BladeRedis redis; |
||||
|
||||
private final Environment environment; |
||||
|
||||
|
||||
@Override |
||||
public void addInterceptors(InterceptorRegistry interceptorRegistry) { |
||||
interceptorRegistry.addInterceptor(new LocalServerLoginAccountsInterceptor(redis,environment)).addPathPatterns("/oldpush/**").order(1); |
||||
} |
||||
} |
Loading…
Reference in new issue