0.95.0 release notes
26th October 2019
🥳 New features
- You can now bind multiple paths to an annotated service easily using
@Path
. #1822 #1870@Get @Post @Path("/a") @Path("/b") public String myAwesomeServcie(...) {...}
- You can now make an annotated service run from
blockingTaskExecutor
by attaching@Blocking
. #2078, #2187@Get("/myHeavyTask") @Blocking public HttpResponse reallyHeavyComputation(...) {...}
- Armeria server now adds
Server
andDate
headers to responses by default. #2137, #2188- If you do not want that behavior, you should call:
Server.builder() .service(...) .disableServerHeader() .disableDateHeader() .build();
- If you do not want that behavior, you should call:
- You can now configure a Caffeine cache spec for
HttpFileService
. #916, #2142Or, using JVM option:HttpFileServiceBuilder.forClassPath("/") .entryCacheSpec("maximumSize=512") .build()
-Dcom.linecorp.armeria.fileServiceCache=maximumSize=1024,expireAfterAccess=600s
- You can now see the Armeria version in the metric. #2179
💪 Improvements
- Armeria server startup time is reduced to 80 percent when TLS is not used. #1645, #2184
- The performance of getting HTTP timestamps is improved by caching the values every second. #2196
- Use
HttpTimestampSupplier.currentTime()
to take advantage of it.
- Use
- The performance of finding service is improved by not making an unused
Map
inRouteResult
. #2153 - The performance of gRPC call is improved by using the singleton HTTP headers when a service does not create a new HTTP headers. #2152
- The performance of making metric
Tag
s is improved by addingTag
s in ascending order. #2150, #2163 - We now have favicon in our
DocService
. #2186
👻 Bug fixes
ServerHttpRequest.getRemoteAddress()
now returns proper address. #2208- You can now see descriptive error messages when
sslContext
is not configured properly. #1844, #2124 - You can now build
(Request|Response)Headers
multiple times using builders. #2190, #2193- Previously, it raised
ClassCastException
ifbuild()
is called twice.
- Previously, it raised
NoRequestContextException
is not raised anymore if you configure the name of the non-request thread.RequestContextCurrentTraceContext.builder() .nonRequestThread("RMI TCP Connection") .build()
NullPointerException
is not raised anymore inHttp1ClientCodec
when the server sends multiple responses for one request. #2210- You can now see the access logs when the method of a request is not allowed and there are no services that match the path. #2159
🚫 Breaking changes
- All annotated services are run from
EventLoop
by default. #2187- Previously, if the return type is neither
HttpResponse
norCompletableFuture
, annotated services are run fromblockingTaskExecutor
.
- Previously, if the return type is neither
ServerBuilder.tls()
now throws a checkedSSLException
. #2124ServerBuilder.sslContext()
methods are completely removed. #2124
⛓ Dependencies
- Brave 5.7.0 -> 5.8.0
- Dropwizard 4.1.0 -> 4.1.1
- gRPC 1.24.0 -> 1.24.1
- Netty 4.1.42 -> 4.1.43
- org.bouncycastle 1.63 -> 1.64
- Prometheus 0.7.0 -> 0.8.0
- RxJava2 2.2.12 -> 2.2.13
- Spring Boot 2.1.8 -> 2.1.9
- Tomcat
- 9.0.26 -> 9.0.27
- 8.5.43 -> 8.5.47
- ZooKeeper 3.5.5 -> 3.5.6