Im试图在旧学校Xml这样做(密码)。
@Bean
@Scope(value="request", proxyMode=ScopedProxyMode.INTERFACES)
public MyInterface createInterface() {
return connectionRepository().getPrimaryConnection(MyInterface.class);
}
我试图这样做:
<bean id="myBean" class="a.b.c.MyInterface"
factory-bean="myFactory" factory-method="create"
scope="request">
<constructor-arg value="a.b.c.MyInterface"></constructor-arg>
<aop:scoped-proxy proxy-target-class="false"/>
</bean>
但一味:
Cannot换算类型的价值[$Proxy12 implementing java.io.Serializable,org. Cerframework.aop.framework.AopInfrastructureBean,org. mersframework.aop. SpringProxy,org.merframework.aop.framework.Advised] to required category [a.b.c.MyInterface] for property myBean : no对编编辑或转化战略没有发现。
Any ideas? Thanks!