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);
    }
}

QQ圖片20180828184600.png
QQ圖片20180828184607.png
QQ圖片20180828184755.png
QQ圖片20180828184803.png

代碼生成器源碼

代碼生成器演示

spring boot 2.x 實例源碼

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,564評論 19 139
  • Spring Boot 參考指南 介紹 轉(zhuǎn)載自:https://www.gitbook.com/book/qbgb...
    毛宇鵬閱讀 47,273評論 6 342
  • Spring Web MVC Spring Web MVC 是包含在 Spring 框架中的 Web 框架,建立于...
    Hsinwong閱讀 22,942評論 1 92
  • “泰”,好??簇援?,上輕下重,外松內(nèi)緊。 正本清源,小往大來,事情就會越來越好。這叫原應(yīng)如此。本卦爻辭和“否”卦相...
    童年的流星閱讀 1,525評論 4 4
  • 寢室里有的不是面對面交流談心的朋友們,而是一個個面對著電腦或手機屏幕傻笑的人。
    自律方得自由閱讀 300評論 0 0

友情鏈接更多精彩內(nèi)容