Spring ApplicationContext 获取类注解为null

问题描述 在controller层使用了自定义注解,使用了切面。使用如下代码,无法获取到自定义注解。 //如何写SpringUtil请参照其他博客 applicationContext().getBean(name); //以下代码报错空指针 sqlFile.getClass().getAnnotation(SQLFileAnnotation.class) Object sqlFile=sqlFi
相关文章
相关标签/搜索