springboot create interceptor

First, create a class MyIntercepor implement HandlerInterceptor interface

   

   

   

Second, create a WebMvcConfig class that implements the WebMvcConfigurer

   

   

   

Third, create a Controller for access

   

   

Fourth, renderings

   

   

Guess you like

Origin www.cnblogs.com/fernfei/p/12079608.html