spring rmi空针
我也踩过这个坑( 1 )
springRMI
详细描述
源码
编辑于2024-11-23
-
[武汉|结业弟子]JAVA-王全0
1.客户端是否有进行配置.例如:
<bean id="smsRMI" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
<property name="serviceUrl" value="rmi://localhost:1099/smsService"/>
<property name="serviceInterface" value="com.service.SmsService"/>
<property name="lookupStubOnStartup" value="false"/>
<property name="refreshStubOnConnectFailure" value="true"/>
</bean>2.客户端调用时是否有加载相关配置文件.例如:
ApplicationContext context = new ClassPathXmlApplicationContext("spring-config-client.xml");
SmsService smsService = (SmsService) context.getBean("smsRMI");编辑于2019-10-12
- 去第 页