1. 程式人生 > >InterceptorRef cannot be resolved to a type 錯誤解決辦法

InterceptorRef cannot be resolved to a type 錯誤解決辦法

       今天在通過註解寫Interceptor時,在使用@InterceptorRef時,一直出現InterceptorRef cannot be resolved to a type。按經驗,這一般是沒導包的提示吧,然後把滑鼠放在這個上面,也沒有導包的選項,那麼問題來了,是沒導包麼?

       好吧,有時在做專案時確實會出現不會出現導包選項的情況,那麼我們就手動寫一條吧,import org.apache.struts2.convention.annotation.InterceptorRef;導進去就沒問題了。