Inject external object in a spring bean
I have a noob spring questi开发者_StackOverflowon. if i have a bean that is dependent on google's gdata api jars. How I represent this in a beans.xml file?
<bean class="com.google.foo.bar.ExternalClass" id="yourExternalBeanName" />
Then you can inject this 3rd party bean in your classes. With XML:
<property name="yourProperty" ref="yourExternalBeanName" />
or annotations:
@Inject
private ExternalClass yourProperty;
精彩评论