Release 8.1.1
Date: Sept 20, 2019
Juneau 8.1.1 is a minor release but introduces some new features/modifications.
juneau-marshall
-
Support for serializing/parsing Optional objects and bean properties.
-
Fixed a bug in the parsers where the generic subtype of a complex bean property type involving both collections and arrays was not being found. (e.g.
List<Long>[]
) -
New packages of HTTP response/exceptions beans from
juneau-rest-server
bundle and REST proxy annotations fromjuneau-rest-client
so that they can be used when building REST proxy interfaces while only pulling in the marshall bundle.org.apache.juneau.http.response org.apache.juneau.http.exceptionorg.apache.juneau.http.remote
These replace the org.apache.juneau.rest.response
, org.apache.juneau.rest.exception
, and org.apache.juneau.rest.client.remote
packages.
-
Defaulting SVL variables now won't ignore additional parameters.
"$S{Foo,bar,baz}"
used to default to"bar"
but now will default to"bar,baz"
. -
Ranking support has been added to all
@XConfig
annotations. This allows you to override the normal precedence of application of config annotations on class and method hierarchies.
juneau-rest-server
-
Support for Optional on method parameters annotated with @Header, @FormData, @Query, @Path.
-
Fixed issue where
RestMethod.debug()annotation wasn't resulting in the HTTP request being logged. -
RestExceptionhas been deprecated and replaced byHttpException. -
Resolved issue where parameterized types on
@RestMethod
-annotated method parameters of Spring beans. This is due to Spring relying on CGLIB for runtime-recompilation of beans that results in loss of parameterized-type information.In the following example, the
beans
parameter would resolve as an unparameterizedList<Object>
which would typically result in getting aList<ObjectMap>
and subsequentClassCastExceptions
.@RestMethod
public void doFoo(@Body List<MyBean> beans) {...}The fix involves resolving the original bean class for resolving parameterized type while leaving method invocation on the proxy method so as not to bypass Spring features.
-
New methods on
BasicRestto provide feature-parity withRestServlet:BasicRestBasicRest.getContext() getContext()BasicRest.getRequest() getRequest()BasicRest.getResponse() getResponse()BasicRest.log(String) log(String)BasicRest.log(String,Throwable) log(String,Throwable)BasicRest.log(Level,String,Object[]) log(Level,String,Object[])BasicRest.logObjects(Level,String,Object[])BasicRest.log(Level,Throwable,String,Object[]) log(Level,Throwable,String,Object[]) -
The
@RestResource(staticFiles)annotation now supports absolute path locations and multiple mappings:// Resolves static files in root package "htdocs" or working directory "htdocs", and then relative package "htdocs".
@RestResource(staticFiles="htdocs:/htdocsfolder,htdocs:htdocs.package") -
Fixed a bug in
@RestResource(staticFiles)where the order of lookup between parent and child resources was wrong.
juneau-rest-client
-
Removed the dependency on the
juneau-rest-server
module. Allows the client API to be used without pulling in all the javax.servlet and server dependencies. -
Support for Optional return types on remote proxy methods.
juneau-examples
- The PetStore application has been moved to a separate Git repository.