Spring RMI 服务器错误

Spring RMI Server Error

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 属性,而不是值。