One Star

Talend ESB Spring and @Autowired

In a route in the Spring tab I create a bean

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

In a regular Talend bean I have

@Autowired
private SessionFactory sessionFactory;

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

Thanks

 

 

 

  • ESB
1 REPLY
Moderator

Re: Talend ESB Spring and @Autowired

Hi,

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

Best regards

Sabrina