Skip to content

armeria-0.57.0

Choose a tag to compare

@trustin trustin released this 02 Feb 04:45

New features

  • #774 #945 RedirectService which sends a redirect response.

    ServerBuilder sb = new ServerBuilder();
    sb.service("/foo/{bar}", new RedirectService("/{bar}/foo"));
    sb.service("regex:^/old-location/(?<path>.*)$",
               new RedirectService("/new-location/{path}"));
  • #852 We now provide Maven BOM (Bill of Materials).

  • #935 #949 Annotated services now support enum parameter types.

    ServerBuilder sb = new ServerBuilder();
    sb.annotatedService(new Object() {
        @Get("/users/by_type/{userType}")
        public AggregatedHttpMessage listUsersByType(@Param("userType") UserType userType) { ... }
    });
    
    public enum UserType {
        ADMIN, MODERATOR, MEMBER
    }
  • #943 #979 All packages are now annotated with NonNullByDefault annotation so that Armeria is more friendly to the compilers and IDEs that understand JSR305 annotations, such Kotlin and IntelliJ IDEA.

    • For Kotlin, add -Xjsr305=strict or -Xjsr305=true compiler option, e.g.

      tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
          kotlinOptions {
              freeCompilerArgs = ["-Xjsr305=strict"]
          }
      }
  • #954 PropertiesEndpointGroup which loads the endpoint list from a .properties file or a Properties

    Properties props = new Properties();
    props.put("example.hosts.0", "example1.com");
    props.put("example.hosts.1", "example2.com:8080");
    props.put("example.hosts.2", "example3.com:9080");
    EndpointGroup myGroup = PropertiesEndpointGroup.of(props, "example.hosts", 80);
  • #965 Add a dangerous option to use ByteBufHttpData for incoming data in gRPC, which yields better throughput when payload is large

  • #967 #981 A Service now has more control over the path cache via Service.shouldCachePath().

    public class MyService implements HttpService {
        @Override
        public boolean shouldCachePath(String path, @Nullable String query, PathMapping pathMapping) {
            // Always cache the path.
            return true;
        }
        ...
    }

Improvements

  • #956 UnframedGrpcService implements ServiceWithPathMappings
  • #959 RequestLog prioritizes an RPC response exception over a stream exception.
  • #964 gRPC messages are serialized into ByteBufHttpData instead of DefaultHttpData for fewer memory copies.

Bug fixes

  • #951 Incorrect use of Class.isAssignableFrom() in annotated services
  • #967 #981 The paths for a prefix path mapping should not be cached by default.
  • #968 Zipkin traces are recorded incorrectly when multiples requests interleave.
  • #971 #973 Client disconnection is not notified in a bidirectional async gRPC.
  • #972 #975 ClientFactory.close() does not close all connections.

Dependencies

  • Prometheus and Dropwizard related dependencies are all optional now.
  • Brave 4.13.1 -> 4.14.3
  • Dropwizard Metrics 3.2.5 -> 4.0.2
  • gRPC 1.8.0 -> 1.9.0
  • Guava: 23.5-jre -> 23.6-jre
  • Jackson 2.9.2 -> 2.9.4
  • Jetty: 9.4.7.v20170914 -> 9.4.8.v20171121
  • Micrometer 1.0.0-rc.5 -> 1.0.0-rc.9
  • Netty: 4.1.19.Final -> 4.1.20.Final
  • Prometheus 0.1.0 -> 0.2.0
  • Spring Boot 1.5.9 -> 1.5.10
  • Tomcat 8.5.24 -> 8.5.27 and 8.0.48 -> 8.0.49
  • Zipkin 2.4.2 -> 2.4.5

Known issues