InterceptorRef cannot be resolved to a type 错误解决办法

红太狼 2022-07-12 17:21 313阅读 0赞

今天在通过注解写Interceptor时,在使用@InterceptorRef时,一直出现InterceptorRef cannot be resolved to a type。按经验,这一般是没导包的提示吧,然后把鼠标放在这个上面,也没有导包的选项,那么问题来了,是没导包么?

好吧,有时在做项目时确实会出现不会出现导包选项的情况,那么我们就手动写一条吧,import org.apache.struts2.convention.annotation.InterceptorRef;导进去就没问题了。

发表评论

表情:
评论列表 (有 0 条评论,313人围观)

还没有评论,来说两句吧...

相关阅读