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

后端 未结 6 1759
终归单人心
终归单人心 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 09:02

    You misses the configuration for webservice inject. So put more inside the web.xml

    
        org.springframework.web.context.ContextLoaderListener
    
    
        com.sun.xml.ws.transport.http.servlet.WSServletContextListener
    
    

    Please don't forget the order. Because you need to init the bean for the autowired field first

    Thanks

提交回复
热议问题