1、把crm系统导入
2、IDEA中导入crm的model对象和service接口类
3、导入hessianjar包
4、配置文件
<bean id="customerService" class="org.springframework.remoting.caucho.HessianProxyFactoryBean"> <property name="serviceInterface" value="com.gyf.crm.service.CustomerService"></property> //接口类 <property name="serviceUrl" value="http://localhost:8080/crm/remoting/customer"></property> //访问路径 </bean>
5、action定义的方法
@Autowired private CustomerService customerService; public void findnoassociationCustomers() throws IOException { List<Customer> customerList= customerService.findnoassociationCustomers(); RespJson(customerList,new String[]{}); }
crm提供接口访问用户数据,在bos中访问crm提供接口,获取数据