Caused by: java.lang.IllegalArgumentException: Service [logService] is a String rather than an actual service reference: Have you accidentally specified the service bean name as value instead of as reference?
<小时/>
这是我的 ServerAppContext 代码:
<bean id="entityRmiServiceExporter" class="org.springframework.remoting.rmi.RmiServiceExporter">
<property name="serviceName" value="log-service"/>
<property name="serviceInterface" value="com.hippie.blog.service.LogService"/>
<property name="service" value="logService"/>
<property name="registryPort" value="2020"/>
</bean>
<bean id="logService" class="com.hippie.blog.service.LogServiceImpl">
</bean>
我似乎无法让它发挥作用。我应该输入什么
property name="service" value="logService"
因为这是错误所指的行。
我需要将其引用到我的 LogServiceImpl
吗?
最佳答案
使用如下:
<property name="service" ref="logService"/>
当您引用其他 bean 时,请使用 ref 属性,而不是 value。
关于java - Spring RMI 服务器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34215704/