发布于 2016-01-22 00:56:05 | 274 次阅读 | 评论: 0 | 来源: 网友投递
Microserver Java 微服务框架
Microserver 是一个零配置、基于标准的身经百战的库,用来运行 Java REST 微服务,通过 Java 标准 main 类执行。从 2014 年开始就一直在 AOL 生产环境中使用。
Microserver v0.80 发布,更新如下:
A spring-based platform for plugin based Microservices development.
The micro-spring-boot plugin allows full-stack integration with Spring Boot (in contrast to the pre-existing Spring Boot plugin which supports only Spring Boot backends). With micro-spring-boot you can run Spring Boot managed servers with Microserver Jersey configuration and plugins.
@MicroSpringBoot //configure this package as the base for autoscan
//optionally use @Microserver here for more configuration options
public class SimpleExample {
RestClient rest = new RestClient(10_000,1_000);
public static void main (String[] args){
new MicroserverApp(()-> "simple-app"); //note unlike traditional microserver apps, there is no need to call start or run here
assertThat(rest.get("http://localhost:8080/simple-app/status/ping"),equalTo("ok"));
}
}
@Rest
@Path("/status")
public class SimpleResource{
@GET
@Produces("text/plain")
@Path("/ping")
public String ping() {
return "ok";
}
}
S3 plugin should allow users to specify a region for S3 client enhancement #151 opened 7 days ago by kewangie
micro-hibernate shouldn't depend on micro-hikaricp bug #146 opened 14 days ago by kewangie
micro-boot integration - Allow micro-boot apps to use Spring Boot severs and front ends enhancement #128 opened on Dec 14, 2015 by johnmcclean-aol
下载页面:0.80
Microserver 是一个零配置、基于标准的身经百战的库,用来运行 Java REST 微服务,通过 Java 标准 main 类执行。从 2014 年开始就一直在 AOL 生产环境中使用。
框架结构:
