Skip to content

armeria-0.60.0

Choose a tag to compare

@trustin trustin released this 30 Mar 05:42
661ed05

New features

  • #1049 Spring Boot 2 support

    • Use the artifact armeria-spring-boot2-autoconfigure or armeria-spring-boot2-autoconfigure-shaded.
  • #1066 #1096 Parameter and header injection into bean property and constructor for annotated services. See the official documentation for more information.

    public class FinderService {
        @Get("/find/:id")
        public String find(@RequestObject FindRequest req) { ... }
    }
    
    // Using constructor
    public class FindRequest {
        public FindRequest(@Param("id") String id, @Header("x-type") String type) {
            this.id = id;
            this.type = type;
        }
        ...
    }
    
    // Using fields
    public class FindRequest {
        @Param("id") private String id;
        @Header("x-type") private String type;
    }
    
    // Using setters
    public class FindRequest {
        public void setId(@Param("id") String id) { ... }
        public void setType(@Header("x-type") String type) { ... }
    }
    
    // Using multi-field setters
    public class FindRequest {
        public void setAll(@Param("id") String id, @Header("x-type") String type) { ... }
    }
  • #1085 Easier self-signed TLS certificate generation with ServerBuilder.tlsSelfSigned(), which may be very useful for testing

    ServerBuilder sb = new Serverbuilder();
    sb.https(8443);
    sb.tlsSelfSigned();
  • #1087 #1089 Endpoint.ipAddr(), which allows specifying an IP address explicitly for an Endpoint. This is a preparatory work for providing better DNS-based service discovery.

  • #1090 MoreNamingConventions.configure(), which configures a Micrometer MeterRegistry to use our better naming convention

  • #1099 #1100 #1101 PROXY protocol support, which is useful when you are behind a load balancer such as HAProxy and AWS ELB

    ServerBuilder sb = new ServerBuilder();
    sb.port(8080, SessionProtoxol.PROXY, SessionProtocol.HTTP);
  • #1099 #1100 #1101 Ability to serve HTTP and HTTPS on the same port

    ServerBuilder sb = new ServerBuilder();
    sb.port(8888, SessionProtoxol.HTTP, SessionProtocol.HTTPS);
    // You can even enable PROXY protocol support, too.
    sb.port(9999, SessionProtoxol.PROXY, SessionProtocol.HTTP, SessionProtocol.HTTPS);

Bug fixes

  • #1091 Potential buffer leaks due to empty ByteBufHttpData
  • #1092 #1097 Buffer leak in StreamMessageDuplicator.close(), which affects RetryingClient
  • #1111 Rename the gauge armeria.server.numConnections to armeria.server.connections

Breaking changes

  • #1110 From this release, Armeria HTTP client will send HTTP/2 connection preface string PRI * HTTP/2.0 first when the URI scheme is http, in lieu of sending the HTTP/1 upgrade request HEAD / HTTP/1.1.
    • Specify -Dcom.linecorp.armeria.defaultUseHttp2Preface=false JVM option or use ClientFactoryBuilder.useHttp2Preface(false) to go back to the old behavior.

Dependencies

  • Brave 4.17.2 -> 4.18.2
  • gRPC 1.10.0 -> 1.11.0
  • Guava 24.0 -> 24.1
  • Jackson 2.9.4 -> 2.9.5
  • JCTools 2.1.1 -> 2.1.2
  • Jetty 9.4.8 -> 9.4.9
  • Kafka Clients 1.0.1 -> 1.1.0
  • Micrometer 1.0.1 -> 1.0.2
  • Netty TCNative BoringSSL 2.0.7 -> 2.0.8
  • Retrofit 2.3.0 -> 2.4.0
  • Tomcat 8.5.28 -> 9.0.6
  • Zipkin 2.5.1 -> 2.7.0