Spring ApplicationContext 獲取類註解爲null

問題描述 在controller層使用了自定義註解,使用了切面。使用如下代碼,無法獲取到自定義註解。 //如何寫SpringUtil請參照其他博客 applicationContext().getBean(name); //以下代碼報錯空指針 sqlFile.getClass().getAnnotation(SQLFileAnnotation.class) Object sqlFile=sqlFi
相關文章
相關標籤/搜索