我想在Spring中连接Google App Engine用户服务,方法是首先创建一个UserServiceFactory bean,然后使用它获取UserService的实例。使用Spring连接Google AppEngine的UserServiceFactory
<bean id="googleUserServiceFactory"
class="com.google.appengine.api.users.UserServiceFactory"></bean>
<bean id="googleUserService"
class="com.google.appengine.api.users.UserService"
factory-bean="googleUserServiceFactory"
factory-method="getUserService"></bean>
我敢肯定这就是连接你从工厂获得一个bean正确的方式,但我得到这个错误:
Error creating bean with name 'googleUserService' defined in ServletContext resource [/WEB-INF/hardwire-service.xml]: No matching factory method found: factory bean 'googleUserServiceFactory'; factory method 'getUserService'
它说,该工厂方法无法找到。工厂方法名称是否改变了?