Juneau 9.0.0 is a major release. Deprecated APIs that have been accumulating over time have been removed.
The underlying code has undergone significant refactoring to ease maintainability and improve overall performance.
General changes
-
Configuration properties have been removed entirely. They have been replaced with a standard builder-based
architecture. In addition to making the code more maintainable, it also improves performance when
creating new serializers/parsers/rest clients (and others).
juneau-marshall
-
Eliminated the various @XConfig(applyX={...}) annotations and replaced them with the ability
to apply targeted annotations directly to configuration classes and methods (such as REST classes/methods).
| @Rest(...)
| @Bean(on="MyBean1,MyBean2",sort=true)
| @UrlEncoding(onClass=MyList.class,expandedParams=true)
| public class MyRestClass {
|
| @RestOp(...)
| @Bean(on="MyBean1,MyBean2",sort=false)
| @UrlEncoding(onClass=MyList.class,expandedParams=false)
| public Object myRestMethod() { ... }
| }
-
New shortened form {@link oaj.http.remote.RemoteOp#value()} for specifying http method name and path.
| // Normal form
| @RemoteOp(method=PUT, path="/foo")
|
| // Shortened form
| @RemoteOp("PUT /foo")
-
New annotations: {@link oaj.http.remote.RemoteGet}/{@link oaj.http.remote.RemotePut}/{@link oaj.http.remote.RemotePost}/{@link oaj.http.remote.RemoteDelete}
-
Significant refactoring of the classes in the {@link oaj.http} package and subpackages. Attempts were made to make classes as natural
extensions to the Apache HttpComponents APIs. Significant new functionality here.
-
New {@link oaj.annotation.Marshalled @Marshalled} annotation for non-bean classes.
-
New {@link oaj.annotation.Bean#example() @Bean(example)} annotation.
-
New {@link oaj.annotation.BeanConfig#ignoreUnknownEnumValues() @BeanConfig(ignoreUnknownEnumValues)} annotation and support for ignoring
unknown enum values during parsing.
-
Java Serialized Object marshalling support has been removed entirely due to security risks with usage (better safe than sorry).
juneau-rest-server
-
Significant refactoring done to allow for many extensible aspects of the API to be performed through injected beans
in Spring. These include logging, debugging, REST method arg types, static files, file finders, swagger creators, thrown stores, response
processors, serializers/parsers, JSON schema generators, statistics gathering stores, and default request attributes/headers and response
headers.
-
Defining REST resources with predefined marshalling support is now much simpler. You now extend from a basic REST servlet/object
class and then include an interface with predefined common annotations.
| // A root resource that supports JSON/HTML marshalling.
| public class MyRootResources extends BasicRestServletGroup implements BasicJsonHtmlConfig { ... }
|
| // A child resource that supports all available marshalling.
| public class MyChildResource extends BasicRestObject implements BasicUniversalConfig { ... }
REST servlets/objects are in the {@link oajr.servlet} package and REST configs are in the {@link oajr.config} package.
-
@RestMethod annotation has been replaced with
{@link oaj.http.remote.RemoteGet} / {@link oaj.http.remote.RemotePut} / {@link oaj.http.remote.RemotePost} / {@link oaj.http.remote.RemoteDelete}
/ {@link oaj.http.remote.RemoteOp}
-
New shortened form {@link oajr.annotation.RestOp#value()} for specifying http method name and path.
| // Normal form
| @RestOp(method=PUT, path="/{propertyName}")
|
| // Shortened form
| @RestOp("PUT /{propertyName}")
juneau-dto
-
Addition of OpenAPI 3.0 ({@link oaj.dto.openapi3} package).
juneau-rest-server-springboot
-
The requirement for using JuneauRestInitializer during App initialization to use bean injection has been eliminated.
Instead, root resources should simply extend from {@link oajr.springboot.BasicSpringRestServlet} and {@link oajr.springboot.BasicSpringRestServletGroup}.
These will automatically hook into the Spring Boot framework for resolution of REST children and various extension beans added
to the REST API framework.
juneau-rest-client
-
While the general usage pattern stays the same, the REST client code has undergone significant rewriting. It is now more inline
as an extension of the Apache HttpClient library. Much new functionality such as support for fluent assertions has been added.
juneau-rest-mock
-
Entirely rewritten. Changes too many to list.