springboot里面写servlet,@WebServlet后,添加自定义注解@interface的注解不生效,无法进入日志切面。
@Log(operModule = "登录模块1",operType = "登录日志查询1")
@WebServlet(name ="ajh", urlPatterns ="/ajh")
public class ajh extends HttpServlet {
@Override
@Log(operModule = "登录模块2",operType = "登录日志查询2")
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
类前面和dopost前面都试着添加,均不生效。
public @interface Log {
String operModule() default "";//操作模块
String operType() default "";//操作类型
}