jersey 在spring环境下为什么不能注入service,
jersey的web.xml配置
[img]http://dl2.iteye.com/upload/attachment/0112/4802/b8cc29aa-19af-3162-8e8e-9ad10d04e045.png[/img]
用spring注解注入
[img]http://dl2.iteye.com/upload/attachment/0112/4804/7edfbbb5-e228-3bc7-ad6f-dbb65e6cbdff.png[/img]
用spring注解注入
[img]http://dl2.iteye.com/upload/attachment/0112/4806/57357e31-0333-3ceb-b517-4583a4836589.png[/img]
调用service里的方法
[img]http://dl2.iteye.com/upload/attachment/0112/4808/fa817b34-3134-3b84-a5cc-9fd271daf29b.png[/img]
直接报错,这明显是service没有注入进来的原因,可不知道为什么啊
[img]http://dl2.iteye.com/upload/attachment/0112/4810/c553899a-6cf3-3154-9f28-6067ca00a723.png[/img]
jersey的web.xml配置
[img]http://dl2.iteye.com/upload/attachment/0112/4802/b8cc29aa-19af-3162-8e8e-9ad10d04e045.png[/img]
用spring注解注入
[img]http://dl2.iteye.com/upload/attachment/0112/4804/7edfbbb5-e228-3bc7-ad6f-dbb65e6cbdff.png[/img]
用spring注解注入
[img]http://dl2.iteye.com/upload/attachment/0112/4806/57357e31-0333-3ceb-b517-4583a4836589.png[/img]
调用service里的方法
[img]http://dl2.iteye.com/upload/attachment/0112/4808/fa817b34-3134-3b84-a5cc-9fd271daf29b.png[/img]
直接报错,这明显是service没有注入进来的原因,可不知道为什么啊
[img]http://dl2.iteye.com/upload/attachment/0112/4810/c553899a-6cf3-3154-9f28-6067ca00a723.png[/img]