Reputation: 5514
In my Spring web application i am trying to import below given imports to annotate my class as @Configuration
and method as @Bean
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
But i am reciving compile time error that the imports does not resolve.
Do i need to add any perticular jar for these imports?
Upvotes: 0
Views: 71
Reputation: 6479
You need to add spring-context in your classpath.
You can find the library here or here.
Upvotes: 1
Reputation: 11487
Use Jar Finder
, search by class name
org.springframework.context.annotation.Bean
org.springframework.context.annotation.Configuration
and then add the necessary jars to your build path.
Upvotes: 1
Reputation: 852
Make sure the Spring jars are present and that they are included as libraries in your project.
Upvotes: 0