springboot拦截器

package com.llf.utils;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Component
public class MyInterceptor implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
       System.out.print("拦截器执行。。。。。。。。。。。。。。。。。。。。。。");
    }

}

 

posted @ 2020-05-02 17:43  _Lawrence  阅读(210)  评论(0)    收藏  举报