- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/aol/micro-server
- 软件文档: https://github.com/aol/micro-server
- 官方下载: https://github.com/aol/micro-server
软件介绍
Microserver 是一个零配置、基于标准的身经百战的库,用来运行 Java REST 微服务,通过 Java 标准 main 类执行。从 2014 年开始就一直在 AOL 生产环境中使用。
框架结构:
main 类:
public class AppRunnerTest {
public static void main(String[] args) throws InterruptedException {
new MicroserverApp(() -> "test-app").run();
}
}服务类:
@Rest
@Path("/status")
public class StatusResource {
@GET
@Produces("text/plain")
@Path("/ping")
public String ping() {
return "ok";
}
}
