| | |
| | | package com.ltkj.framework.config; |
| | | |
| | | import com.ltkj.framework.interceptor.DBChangeInterceptor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | |
| | | //定义拦截器 |
| | | @Configuration |
| | | public class WebConfig implements WebMvcConfigurer { |
| | | |
| | | @Autowired |
| | | private DBChangeInterceptor dbChangeInterceptor; |
| | | |
| | | @Override |
| | | public void addInterceptors(InterceptorRegistry registry) { |
| | | registry.addInterceptor(new TokenInterceptor()) |
| | |
| | | "/lis/**","/api/His/**","/pacs/**", |
| | | "/callBack/**" |
| | | }); |
| | | |
| | | registry.addInterceptor(dbChangeInterceptor) |
| | | .addPathPatterns("/**"); |
| | | } |
| | | } |