摘要: 1.编写一个拦截器实现HandlerInterceptor接口 2.拦截器注册到容器中(实现WebMvcConfigurerAdapter的addInterceptors) 3.指定拦截规则(如果是拦截所有,静态资源也会被拦截) InterceptorConfig代码 package com.xt. 阅读全文
posted @ 2022-07-17 09:48 Mr_sven 阅读(25) 评论(0) 推荐(0) 编辑