springboot 整合hessian(client端)

client端

pom.xml 同server端

application.properties

server.port = 8081

user.java 同server端

userCondition.java 同server端

IHelloService 同server端

主程序(重点.....)

package com;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.remoting.caucho.HessianProxyFactoryBean;

import com.example.IHelloService;

/**
 * @功能描述 Hessian实例之客户端
 * @author www.gaozz.club
 * @date 2018-08-26
 */
@SpringBootApplication
public class HessianClient {
    @Bean
    public HessianProxyFactoryBean helloClient() {
        HessianProxyFactoryBean factory = new HessianProxyFactoryBean();
        factory.setServiceUrl("http://localhost:8080/HelloService");
        factory.setServiceInterface(IHelloService.class);
        return factory;
    }

    public static void main(String[] args) {
        SpringApplication.run(HessianClient.class, args);
    }
}

springboot 整合hessian(client端)_第1张图片
QQ图片20180828184600.png
springboot 整合hessian(client端)_第2张图片
QQ图片20180828184607.png
springboot 整合hessian(client端)_第3张图片
QQ图片20180828184755.png
springboot 整合hessian(client端)_第4张图片
QQ图片20180828184803.png

代码生成器源码

代码生成器演示

spring boot 2.x 实例源码

你可能感兴趣的:(springboot 整合hessian(client端))