admin管理员组文章数量:1565368
配置文件不变:
<!-- 分类 -->
<bean id="commoCategoryServComponent" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
<property name="serviceUrl" value="${ecos_commodity_remote.url}/ICommoCategoryServComponent"/>
<property name="serviceInterface" value="org.lazicats.ecosmodity.serviceponent.ICommoCategoryServComponent"/>
</bean>
<!-- 运营分类 -->
<bean id="categoryServComponent" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
<property name="serviceUrl" value="${ecos_commodity_remote.url}/IOperatingCategoryServComponent"/>
<property name="serviceInterface" value="org.lazicats.ecosmodity.serviceponent.IOperatingCategoryServComponent"/>
</bean>
引用的java变动:
@Resource
private ICommoCategoryServComponent categoryServComponent;
but was actually of type [$Proxy7]
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productStockController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productStockViewComponentImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'categoryServComponent' must be of type [org.lazicats.ecosmodity.serviceponent.ICommoCategoryServComponent], but was actually of type [$Proxy7]
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
下面就OK
@Resource
private ICommoCategoryServComponent commoCategoryServComponent;
版权声明:本文标题:Java RMI方式调用问题but was actually of type [$Proxy7] 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1726603622a1077307.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论