JAXWS 開發webService ,使用spring注入service類時,無法注入,報空指針

解決方法:

實現類需要extends SpringBeanAutowiringSupport ,舉例如下:

public class SyncUsersImpl extends SpringBeanAutowiringSupport implements ISyncUsers{

  @Autowired(required=true)
  private CsrService csrService;

  ...

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章