Hello,
if you use "<context:component-scan ...." in your Spring configuration
and want to inject objects in your classes, you have to annote them so
Spring knows about them.
Either add:
- <bean id="A_NAME_FOR_THAT_BEAN"
class="CLASS.PACKAGE.YOUR.BEAN" /> in your Spring file
configuration. (No more need of component scan)
Or
- @Service("A_NAME_FOR_THAT_BEAN") as annotation for a service classe,
@Repository("A_NAME_FOR_THAT_BEAN")
Regards,
JN Gerbaux
--
View this message in context: http://jersey.576304.n2.nabble.com/Try-to-integrete-Jersey-with-Spring-but-got-null-pointer-when-use-autowire-to-inject-tp7583189p7583247.html
Sent from the Jersey mailing list archive at Nabble.com.