blob: 8499572e0a53e377272b7f4d3c306bc75fb19002 [file] [log] [blame]
<!--
/***************************************************************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
***************************************************************************************************************************/
-->
8.1.1 (Sept 20, 2019)
<p>
Juneau 8.1.1 is a minor release but introduces some new features/modifications.
</p>
<h5 class='topic w800'>juneau-marshall</h5>
<ul class='spaced-list'>
<li>
Support for serializing/parsing {@link java.util.Optional} objects and bean properties.
<li>
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. <c>List&lt;Long&gt;[]</c>)
<li>
New packages of HTTP response/exceptions beans from <c>juneau-rest-server</c> bundle and REST proxy annotations from <c>juneau-rest-client</c>
so that they can be used when building REST proxy interfaces while only pulling in the marshall bundle.
<ul>
<li class='jp'>{@link oaj.http.response}
<li class='jp'>{@link oaj.http.exception}
<li class='jp'>{@link oaj.http.remote}
</ul>
These replace the <c>org.apache.juneau.rest.response</c>, <c>org.apache.juneau.rest.exception</c>, and <c>org.apache.juneau.rest.client.remote</c> packages.
<li>
Defaulting SVL variables now won't ignore additional parameters.
<br><js>"$S{Foo,bar,baz}"</js> used to default to <js>"bar"</js> but now will default to <js>"bar,baz"</js>.
<li>
Ranking support has been added to all <ja>@XConfig</ja> annotations.
This allows you to override the normal precedence of application of config annotations on class and method hierarchies.
</ul>
<h5 class='topic w800'>juneau-rest-server</h5>
<ul class='spaced-list'>
<li>
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}.
<li>
Fixed issue where {@link oajr.annotation.RestMethod#debug() RestMethod.debug()} annotation wasn't resulting
in the HTTP request being logged.
<li>
{@link oajr.RestException} has been deprecated and replaced by {@link oaj.http.exception.HttpException}.
<li>
Resolved issue where parameterized types on <ja>@RestMethod</ja>-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.
<br>In the following example, the <c>beans</c> parameter would resolve as an unparameterized <c>List</c>
which would typically result in getting a <c>List&lt;ObjectMap&gt;<c> and subsequent <c>ClassCastExceptions</c>.
<p class='bcode w800'>
<ja>@RestMethod</ja>
<jk>public void</jk> doFoo(<ja>@Body</ja> List&lt;MyBean&gt; beans) {...}
</p>
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.
<li>
New methods on {@link oajr.BasicRest} to provide feature-parity with {@link oajr.RestServlet}:
<ul class='javatree'>
<li class='jc'>{@link oajr.BasicRest}
<ul>
<li class='jm'>{@link oajr.BasicRest#getContext() getContext()}
<li class='jm'>{@link oajr.BasicRest#getRequest() getRequest()}
<li class='jm'>{@link oajr.BasicRest#getResponse() getResponse()}
<li class='jm'>{@link oajr.BasicRest#log(String) log(String)}
<li class='jm'>{@link oajr.BasicRest#log(String,Throwable) log(String,Throwable)}
<li class='jm'>{@link oajr.BasicRest#log(Level,String,Object[]) log(Level,String,Object[])}
<li class='jm'>{@link oajr.BasicRest#logObjects(Level,String,Object[]) logObjects(Level,String,Object[])}
<li class='jm'>{@link oajr.BasicRest#log(Level,Throwable,String,Object[]) log(Level,Throwable,String,Object[])}
</ul>
</ul>
<li>
The <dc>@RestResource(staticFiles)</dc> annotation now supports absolute path locations and multiple mappings:
<p class='bcode w800'>
<jc>// Resolves static files in root package "htdocs" or working directory "htdocs", and then relative package "htdocs".</jc>
<ja>@RestResource</ja>(staticFiles=<js>"htdocs:/htdocsfolder,htdocs:htdocs.package"</js>)
</p>
<li>
Fixed a bug in <dc>@RestResource(staticFiles)</dc> where the order of lookup between parent and child resources
was wrong.
</ul>
<h5 class='topic w800'>juneau-rest-client</h5>
<ul class='spaced-list'>
<li>
Removed the dependency on the <c>juneau-rest-server</c> module.
Allows the client API to be used without pulling in all the javax.servlet and server dependencies.
</ul>
<h5 class='topic w800'>juneau-examples</h5>
<ul class='spaced-list'>
<li>
The PetStore application has been moved to a separate Git repository.
<ul>
<li><a class='doclink' href='https://github.com/apache/juneau-petstore'>GitHub Repo</a>
<li><a class='doclink' href='http://juneau.apache.org/index.html#petstore.html'>Documentation</a>
</ul>
</ul>