【问题标题】:Apache Axis2 and Spring3 how to use @AutowiredApache Axis2 和 Spring3 如何使用 @Autowired
【发布时间】:2011-04-03 23:05:18
【问题描述】:

自从我的 1.x 天以来我就没有使用过 Apache Axis,所以我在这里有点生疏。我的问题是……如何在我的 Apache Axis2 服务端点类中使用 @Autowired 注释?这可能吗?我做了一些谷歌搜索,但还没有找到任何结论性的东西。我正在使用 Apache Axis2 版本 1.5.1 和 Spring 3.0.3。我只想将一个简单的 DAO 自动装配到我的 Web 服务端点中。我不认为那会那么难。我已经配置了我的 applicationContext.xml 并在一个简单的 DBunit JUnit 测试用例中测试了我的 DAO,所以它工作正常。我还可以在我的 JUnit 测试中自动装配我的 Spring bean。在我的 WAR 中,我将 web.xml 配置为使用 org.springframework.web.context.ContextLoaderListener。这工作正常,我可以看到当我部署加载 applicationCONtext 的战争时。现在如何连接它,以便可以在我的 Apache Axis2 服务端点类中使用 @Autowired?

提前感谢您的帮助! 凯尔

【问题讨论】:

    标签: apache spring axis2 autowired


    【解决方案1】:

    解决了我自己的问题。 Jsst 需要让我的 Service Endpoint 类简单地扩展 SpringBeanAutowiringSupport 类。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-09-01
      • 2011-05-22
      • 2011-05-23
      • 1970-01-01
      • 1970-01-01
      • 2011-12-05
      • 2015-08-31
      • 2010-09-09
      相关资源
      最近更新 更多