Resource注解无法导入依赖使用javax.annotation的注解类

使用javax.annotation的注解类

javax.annotation.Resource 注解在eclipse中无法通过 ctrl + shift + O导入该注解类,是因为javax是属于扩展库中,需要手动下载,或者使用maven依赖如下:

<dependency>
    <groupId>javax.annotation</groupId>
    <artifactId>jsr250-api</artifactId>
    <version>1.0</version>
</dependency>
posted @ 2016-09-21 14:52  IT当时语_青山师  阅读(7)  评论(0编辑  收藏  举报  来源