springboot 拦截器中使用@Value注解为null

拦截器中获取应用名称为null

 

需要在 WebMvcConfiguration 类中 先把 LogInterceptor 注入,LogInterceptor 中的@Value注解就可以获取到值了

 

posted @ 2020-10-21 15:37  Sea_wxx  阅读(388)  评论(0编辑  收藏  举报