I have a simple
maven project (not a maven web project) and I want to use spring annotations in my code. I have successfully used spring-context and spring-core in my pom.xml and I defiened applicationContext.xml with . But I can not find or use org.springframework.stereotype (Service, Autowired Annotations) in my code. It is not possible to use such kind of Spring basic annotations if my project is not a web based project ?
Cheers
"Does not work" means it gives compile error . this is pom.xml 's dependency :
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
and this is my import which does not work
import org.springframework.stereotype