Skip to content

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

Notifications You must be signed in to change notification settings

apache/servicecomb-java-chassis

Java Chassis 中文Maven CentralLicense

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.

If you find this project helpful, please don't forget to star it.

releases

Release TrainLatest VersionCompiled JDK VersionTested JDK VersionOpen APINotes
Java Chassis 33.3.0OpenJDK 17OpenJDK 173.0.xDepends on Spring Boot 3
Java Chassis 22.8.24OpenJDK 8OpenJDK 8, 11, 172.0.xDepends on Spring 5
Java Chassis 11.3.11OpenJDK 8OpenJDK 82.0.xEnd of Support

Java Chassis core dependencies

Java ChassisSpring BootVert.xSwaggerJackson
3.3.x3.4.x4.5.x2.2.x2.18.x
3.2.x3.3.x4.5.x2.2.x2.18.x

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") publicinterfaceProviderService{@GetMapping("/sayHello") StringsayHello(@RequestParam("name") Stringname)}
  • Provider service
@RestSchema(schemaId = "ProviderController", schemaInterface = ProviderService.class) publicclassProviderControllerimplementsProviderService{@OverridepublicStringsayHello(Stringname){return"Hello " + name} }
  • Consumer service
@ConfigurationpublicclassProviderServiceConfiguration{@BeanpublicProviderServiceproviderService(){returnInvoker.createProxy("provider", "ProviderController", ProviderService.class)} }

Invoke Provider service with RPC

@RestSchema(schemaId = "ConsumerController", schemaInterface = ConsumerService.class) publicclassConsumerControllerimplementsConsumerService{privateProviderServiceproviderService; @AutowiredpublicvoidsetProviderService(ProviderServiceproviderService){this.providerService = providerService} @OverridepublicStringsayHello(Stringname){returnproviderService.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: subscribedev

Contributing

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

License

Licensed under an Apache 2.0 license.

About

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

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages