JAX WS webservice does not take spring bean from applicationcontext, hence throws null pointer exception

后端 未结 6 1764
终归单人心
终归单人心 2021-01-18 07:55

Hi I have got the webservice up and running , i have used jax ws. I have used Spring to be able to use beans with Autowired and stuff that spring gives like property value i

6条回答
  •  花落未央
    2021-01-18 08:46

    I think it's more likely that your Spring context has not be loaded and made available to the web service. How have you done that?

    You should have a ContextLoaderListener configured in the web.xml for the WAR in which the web service is deployed. Did you tell it where to load the Spring context? Are you using component scan?

    http://renidev.wordpress.com/2009/02/02/how-to-use-springs-context-component-scan-and-annotation/

提交回复
热议问题