开发者

How to make IntelliJ understand annotations

I have recently switched from using Eclipse to IntelliJ, and am preferring the experience.

However, the IDE is not understanding any of the Annotations. I am using Spring @Autowired annotation as well as some of the Spring-WS annotations and the IDE is telling me that they are unresolved.

When the project is built using Maven, it build开发者_运维问答s fine, and the Annotations are recognised in Eclipse.

Im sure this is a simple setup thing, but cannot find any information on how to set it up.


As Peter said, when correctly importing the Maven project the dependencies should be correctly recognized. The IntelliJ manual has a section on how to import a Maven project.


For the record, in our project pom, we have the following dependencies:

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>3.0.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>3.0.5.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.ws</groupId>
        <artifactId>spring-ws-core</artifactId>
        <version>2.0.1.RELEASE</version>
    </dependency>

The former two have been present already before implementing a web service, so they may not be required strictly for web services.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜