Eclipse is not recognising @Inject in my JSF-Apache Myfaces/Spring/Hibernate project.
I am trying to use it on a setter method to inject a reference to a Class I’ve registered with the Spring container as a @Component, @SessionScoped.
What gives? I appear to have the latest version of Spring defined in my POM.
@Injectis not a Spring annotation, but an annotation brought about by JSR-330. It is an annotation that Spring supports and it is synonymous with the@Autowiredannotation.You have to make sure that you have the jar that contains
@Inject, because it is not a part of the standard JDK. You can download the jar from here, or you can use this maven dependency: