armeria-0.54.0
Breaking changes
- #738 #775 Replaced
com.linecorp.armeria.server.annotation.Optionalwithcom.linecorp.armeria.server.annotation.Default.
New features
-
#18 #726 Added
ThrottlingHttpServiceandThrottlingRpcService, which reject incoming requests based onThrottlingStrategyServerBuilder sb = new ServerBuilder(); sb.service("/foo", myService.decorate( ThrottlingHttpService.newDecorator( new RateLimitingThrottlingStrategy<>(10.0 /* requests per second */))));
-
#678 #772 Added
LoggingClientBuilderfor more customization ofLoggingClientHttpClient client = new HttpClientBuilder("http://example.com/") .decorator(new LoggingClientBuilder() .requestLogLevel(LogLevel.INFO) .successfulResponseLogLevel(LogLevel.INFO) .failureResponseLogLevel(LogLevel.WARN) .newDecorator()) .build();
-
#689 Replaced HttpVfs entry cache to Caffeine cache
- Cache metrics are exported under
armeria.server.file.vfsCache.
- Cache metrics are exported under
-
#738 #775 Support
Optional<T>parameter type for annotated services.public class MyAnnotatedService { @Post("/style_1") public AggregatedHttpMessage postWithOptional(@Param("type") Optional<String> type, @Param("value") String value) { final String actualType = type.orElse("plaintext"); ... } @Post("/style_2") public AggregatedHttpMessage postWithDefault(@Param("type") @Default("plaintext") String type, @Param("value") String value) { ... } }
-
#785 Added
ConcurrentCompositeMeterRegistrywhich works around the known scalability issue with MicrometerCompositeMeterRegistry. We will remove this class once we upgrade to Micrometer 1.0.0-rc.3 or above.
Improvements
- #746 Annotated services will respond with
400 Bad Requestrather than500 Internal Server Errorwhen a handler method throws anIllegalArgumentException.
Bug fixes
- #754 #788 Server raises an exception when received a request with unsupported method
- #767 #770 Spring Boot configuration raises
NoSuchElementExceptionwhen noMeterRegistrybean is present. - #780 #781 Client-side Thrift callback is not notified correctly for a void method with
RetryingRpcClient. - #782 #783
NullPointerExceptionis raised when one-way Thrift method fails with an exception. - #784 The default
MeterIdFunctiondoes not add thehostnamePatterntag.
Dependencies
- Caffeine 2.5.5 -> 2.5.6
- Checkstyle 8.2 -> 8.3
- completable-futures -> 0.3.1 -> 0.3.2
- Dropwizard Metrics 3.2.4 -> 3.2.5
- gRPC 1.6.1 -> 1.7.0
- Guava 23.0 -> 23.2
- Hibernate Validator 5.4.1 -> 6.0.3
- Jackson 2.8.9 -> 2.9.2
- java.validation 1.0.0 -> 2.0.0
- Javassist 3.21.0 -> 3.22.0
- Jetty 9.4.6 -> 9.4.7
- Kafka clients 0.11.0.0 -> 0.11.0.1
- Mockito 2.8.47 -> 2.11.0
- Netty 4.1.15 -> 4.1.16
- Prometheus 0.0.26 -> 0.1.0
- Spring Boot 1.5.6 -> 1.5.8
- Tomcat 8.5.20 -> 8.5.23, 8.0.46 -> 8.0.47