Spring框架中@Resource注解报错解决方案

xiaoxiao2021-02-28  95

问题:Spring框架中,@Resource注解报错,在书写时没有自动提示

解决:因为maven配置文件的pom.xml文件中缺少javax.annotation的依赖,在pom.项目路中加入依赖即可

<!-- Javax Annotation --> <dependency> <groupId>javax.annotation</groupId> <artifactId>jsr250-api</artifactId> <version>1.0</version> </dependency> 也可以从MavenRepository下载 点击打开链接

转载请注明原文地址: https://www.6miu.com/read-56119.html

最新回复(0)