How to autowire a bean loaded by Hibernate?
Hi, I'm using Spring 3.1.0.RELEASE. One of my Hibernate classes (EventFeed) references a class (AbstractEventParser ), in which I'd like to get access to a service, loaded by Spring. However, my autowiring is failing (the service is always null). I'm trying ...
Code:
@Configurable
public abstract class AbstractEventParser {
@Autowired
protected NetUtilsService netUtilsService;
And my service class has
Code:
@Service("netUtilsService")
public final class NetUtilsServiceImpl implements NetUtilsService {
but the netUtilsService member field is always null in the AbstractEventParser class above. What do I have to do to successfully autowire the field in the "AbstractEventParser" class? I have verified that my applicationContext.xml scans the class ...
Code:
<mvc:annotation-driven />
<context:component-scan base-package="com.myco.myproject" />
Thanks, - Dave