感谢jamestastic和skaffman,现在一切正常:)
以下是需要添加到Web配置文件中以使其协同工作的行:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" ...line1 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context ...line2 http://www.springframework.org/schema/context/spring-context-2.5.xsd"> ...line3 <context:annotation-config/> ...line4 <context:component-scan base-package="myPackage"/> ...line5 <bean /> ...line6 <bean /> ...line7 <bean /> ...line8</beans>
我太懒了,没有在主应用程序中添加第8行。
非常感谢



