java
2020-07-21
2020-07-21
今天写了个拦截器,注入一个Service,结果没注入进去,报空指针
后来发现原来在拦截器配置处需要用@Bean的形式注入
并且在上面addInterceptor里面调用该函数
1 | |

2020-07-21
今天写了个拦截器,注入一个Service,结果没注入进去,报空指针
后来发现原来在拦截器配置处需要用@Bean的形式注入
并且在上面addInterceptor里面调用该函数
1 | |
