基于 JVM 的微服务应用框架 Micronaut

码农软件 · 软件分类 · 微服务框架 · 2019-03-17 18:58:40

软件介绍

Grails 框架作者的最新力作,Micronaut 是一个新一代基于 JVM 的全栈的微服务框架,用于构建模块化的、易于测试的微服务应用。

Micronaut 的灵感来自于这些年作者使用 Spring、Spring Boot 和 Grails 构建从大型应用到服务应用的经历。

Micronaut 旨在提供所有构建微服务应用必要的工具,包括:

  • 依赖注入和控制反转 (IoC)

  • 规范优于配置和自动配置

  • 配置和配置共享

  • 服务发现

  • HTTP 路由

  • HTTP 客户端和客户端的负载均衡

与此同时,Micronaut 还避免了诸如 Spring、Spring Boot 框架的下载,带来的优势是:

  • 更快的启动时间

  • 降低内存占用

  • 最小化的反射使用

  • 最小化的代理使用

  • 易于单元测试

基于 Netty 无堵塞 HTTP 服务:

import io.micronaut.http.annotation.*;

@Controller("/hello") 
public class HelloController {

    @Get("/") 
    public String index() {
        return "Hello World"; 
    }
}

客户端:

import io.micronaut.http.annotation.Get;
import io.micronaut.http.client.Client;
import io.reactivex.Single;

@Client("/hello") 
public interface HelloClient {

    @Get("/") 
    Single hello(); 
}

本文地址:https://codercto.com/soft/d/1567.html

Remote

Remote

Jason Fried、David Heinemeier Hansson / Crown Business / 2013-10-29 / CAD 26.95

The “work from home” phenomenon is thoroughly explored in this illuminating new book from bestselling 37signals founders Fried and Hansson, who point to the surging trend of employees working from hom......一起来看看 《Remote》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

在线进制转换器
在线进制转换器

各进制数互转换器

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具