zoukankan      html  css  js  c++  java
  • SpringMVC使用Burlap发布远程服务

    参考这篇文章https://www.cnblogs.com/fanqisoft/p/10283156.html

    将提供者配置类中的

    1     @Bean
    2     public HessianServiceExporter hessianExporterUserService(UserService userService){
    3         HessianServiceExporter hessianServiceExporter = new HessianServiceExporter();
    4         hessianServiceExporter.setService(userService);
    5         hessianServiceExporter.setServiceInterface(UserService.class);
    6         return hessianServiceExporter;
    7     }

    替换为

    1     @Bean
    2     public BurlapServiceExporter burlapExportedUserService(UserService userService){
    3         BurlapServiceExporter burlapServiceExporter = new BurlapServiceExporter();
    4         burlapServiceExporter.setService(userService);
    5         burlapServiceExporter.setServiceInterface(UserService.class);
    6         return burlapServiceExporter;
    7     }

    将服务消费者

    1     @Bean
    2     public HessianProxyFactoryBean userService(){
    3         HessianProxyFactoryBean proxy = new HessianProxyFactoryBean();
    4         proxy.setServiceUrl("http://localhost:8081/SpringRmiService_war_exploded/user.service");
    5         proxy.setServiceInterface(UserService.class);
    6         return proxy;
    7     }

    替换为

    1     @Bean
    2     public BurlapProxyFactoryBean userService(){
    3         BurlapProxyFactoryBean proxy = new BurlapProxyFactoryBean();
    4         proxy.setServiceUrl("http://localhost:8081/SpringRmiService_war_exploded/user.service");
    5         proxy.setServiceInterface(UserService.class);
    6         return proxy;
    7     }
  • 相关阅读:
    Python基础:Python可变对象和不可变对象
    python内置函数
    python元组和序列
    python模块简单使用
    python循环技巧
    皮尔逊积矩相关系数
    Python基础:Python的变量和对象
    统计学中的自由度
    python 速成指南
    在SQL Server中,SQL语句的Insert支持一次插入多条记录
  • 原文地址:https://www.cnblogs.com/fanqisoft/p/10283600.html
Copyright © 2011-2022 走看看