8.1.1 (Sept 20, 2019)
Juneau 8.1.1 is a minor release but introduces some new features/modifications.
juneau-marshall
-
Support for serializing/parsing {@link java.util.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 from juneau-rest-client
so that they can be used when building REST proxy interfaces while only pulling in the marshall bundle.
- {@link oaj.http.response}
- {@link oaj.http.exception}
- {@link oaj.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 {@link java.util.Optional} on method parameters annotated with {@link oaj.http.annotation.Header}, {@link oaj.http.annotation.FormData},
{@link oaj.http.annotation.Query}, {@link oaj.http.annotation.Path}.
-
Fixed issue where {@link oajr.annotation.RestMethod#debug() RestMethod.debug()} annotation wasn't resulting
in the HTTP request being logged.
-
{@link oajr.RestException} has been deprecated and replaced by {@link oaj.http.exception.HttpException}.
-
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 unparameterized List
which would typically result in getting a List<ObjectMap> and subsequent ClassCastExceptions.
@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 {@link oajr.BasicRest} to provide feature-parity with {@link oajr.RestServlet}:
- {@link oajr.BasicRest}
- {@link oajr.BasicRest#getContext() getContext()}
- {@link oajr.BasicRest#getRequest() getRequest()}
- {@link oajr.BasicRest#getResponse() getResponse()}
- {@link oajr.BasicRest#log(String) log(String)}
- {@link oajr.BasicRest#log(String,Throwable) log(String,Throwable)}
- {@link oajr.BasicRest#log(Level,String,Object[]) log(Level,String,Object[])}
- {@link oajr.BasicRest#logObjects(Level,String,Object[]) logObjects(Level,String,Object[])}
- {@link oajr.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.
juneau-examples
-
The PetStore application has been moved to a separate Git repository.