Talend ESB Spring and @Autowired

Four Stars

Talend ESB Spring and @Autowired

In a route in the Spring tab I create a bean

<bean id="sessionFactory"
<property name="dataSource" ref="myDataSource" />
<property name="hibernateProperties">
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle8iDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<property name="packagesToScan" value="beans"/>

In a regular Talend bean I have

private SessionFactory sessionFactory;

It is always null.  What else do I need to do?






Re: Talend ESB Spring and @Autowired


Have you also imported spring framework and packed all needed libaries? What's talend build version you are using?

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.