GithubHelp home page GithubHelp logo

light's Introduction

light

轻量级的远程通信组件

快速指南

服务端

 1. 导入依赖

<dependency>
  <groupId>com.na.light</groupId>
  <artifactId>spring-boot-starter-light-server</artifactId>
  <version>1.0-SNAPSHOT</version>
</dependency>
  1. 标记远程接口服务(必须要有接口,该标记标注在实现类上)
@LightRpcService("userRemote")
public class UserRemoteImpl implements IUserRemote {
  1. 增加相应配置(application.properties)
spring.light.scan=com.na.manager.remote
spring.light.zookeeper.url=192.168.0.238:2181
spring.light.zookeeper.timeout=5000

 4. 启动服务

客户端

 1. 导入依赖

<dependency>
  <groupId>com.na.light</groupId>
  <artifactId>spring-boot-starter-light-client</artifactId>
  <version>1.0-SNAPSHOT</version>
</dependency>
  1. 标记远程接口服务(标记标注在接口上)
@LightRpcService("userRemote")
public interface IUserRemote {
  1. 增加相应配置增加相应配置(application.properties)
spring.light.scan=com.na.manager.remote
spring.light.zookeeper.url=192.168.0.238:2181
spring.light.zookeeper.timeout=5000
  1. 调用服务
@Autowired
private IUserRemote userRemote;
  1. 启动服务

功能

  • Venus
  • 序列化支持  - [x] Hessian
    • Protbuffer
  • 注册中心  - [ ] Zookeeper
    • Consul

light's People

Contributors

ljl8086 avatar

Watchers

James Cloos avatar Thomas Gong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.