Giter Site home page Giter Site logo

chengyouling / servicecomb-java-chassis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/servicecomb-java-chassis

0.0 0.0 0.0 27.54 MB

ServiceComb Java Chassis is a Software Development Kit (SDK) for rapid development of microservices in Java, providing service registration, service discovery, dynamic routing, and service management features

License: Apache License 2.0

Java 99.99% HTML 0.01%

servicecomb-java-chassis's Introduction

Java Chassis 中文 Maven Central License

Apache ServiceComb Java Chassis is a Software Development Kit (SDK) for rapid development of microservices in Java, providing service registration, service discovery, dynamic routing, and service management features.

releases

Release Train Latest Version Compiled JDK Version Tested JDK Version Open API Notes
Java Chassis 3 3.2.1 OpenJDK 17 OpenJDK 17 3.0.x Depends on Spring Boot 3
Java Chassis 2 2.8.19 OpenJDK 8 OpenJDK 8, 11, 17 2.0.x Depends on Spring 5
Java Chassis 1 1.3.11 OpenJDK 8 OpenJDK 8 2.0.x End of Support

NOTICE: Since Open API 3.0.x is not compatible with 2.0.x, Java Chassis 2 and Java Chassis 1 can not work together with Java Chassis 3. All related consumers, providers and edge service need use Java Chassis 3 when upgrading.

NOTICE: Java Chassis 1 reached its end of support now after it's first release from 2018.

Quick Start

  • Define API
@RequestMapping(path = "/provider")
public interface ProviderService {
  @GetMapping("/sayHello")
  String sayHello(@RequestParam("name") String name);
}
  • Provider service
@RestSchema(schemaId = "ProviderController", schemaInterface = ProviderService.class)
public class ProviderController implements ProviderService {
  @Override
  public String sayHello(String name) {
    return "Hello " + name;
  }
}
  • Consumer service
@Configuration
public class ProviderServiceConfiguration {
  @Bean
  public ProviderService providerService() {
    return Invoker.createProxy("provider", "ProviderController", ProviderService.class);
  }
}

Invoke Provider service with RPC

@RestSchema(schemaId = "ConsumerController", schemaInterface = ConsumerService.class)
public class ConsumerController implements ConsumerService {
  private ProviderService providerService;

  @Autowired
  public void setProviderService(ProviderService providerService) {
    this.providerService = providerService;
  }

  @Override
  public String sayHello(String name) {
    return providerService.sayHello(name);
  }
}

Try out this example here .

Documentation

Project documentation is available on the ServiceComb Java Chassis Developer Guide.

Building

You don’t need to build from source to use Java Chassis (binaries in apache nexus ), but if you want to try out the latest and greatest, Java Chassis can be easily built with the maven. You also need JDK 17.

  mvn clean install

The first build may take a longer than expected as Maven downloads all the dependencies.

Automated Testing

To build the docker image and run the integration tests with docker, you can use maven docker profile

  mvn clean install -Pdocker -Pit

If you are using docker machine, please use the following command

  mvn clean install -Pdocker -Pit -Pdocker-machine

Contact

Bugs: issues

mailing list: subscribe dev

Contributing

See CONTRIBUTING for details on submitting patches and the contribution workflow.

Star this project

If you like this project, do not forget star it.

Star History Chart

License

Licensed under an Apache 2.0 license.

servicecomb-java-chassis's People

Contributors

liubao68 avatar wujimin avatar dependabot[bot] avatar yhs0092 avatar seanyinx avatar willemjiang avatar shoothzj avatar lovehzj avatar heyile avatar asifdxtreme avatar develpoerx avatar david6969xin avatar eric-lee-ltk avatar acsukesh avatar guoyl123 avatar yangbor avatar fu-turer avatar angli2 avatar laijianbin avatar jungan21 avatar jeho0815 avatar chengyouling avatar zanechou1 avatar maheshrajus avatar yanghao605 avatar lbc97 avatar kaister3 avatar aseto2016 avatar fanjiwang1992 avatar xuyiyun0929 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.