Thanks to your support for our regular beta programme, we are able to release new Liberty features every few months. Check out the 18.104.22.168 release of WebSphere Liberty which is built on the 22.214.171.124 release of Open Liberty. Look out for more betas over the coming months. If you just can’t wait, take a look at the daily builds of Open Liberty.
Follow Open Liberty happenings on @OpenLibertyIO.
What’s new in this beta?
MicroProfile Rest Client 1.0
The MicroProfile Rest Client builds on the JAX-RS 2.0 Client APIs to provide a type-safe approach for invoking RESTful services over HTTP. This means writing client applications with more model-centric code and less “plumbing”. You can create a Java interface that represents a remote RESTful service. Decorate the methods with appropriate
@POST, etc. annotations, and then invoke those methods like a POJO and get the response from the remote service.
To enable the MicroProfile Rest Client in the
<featureManager> <feature>mpRestClient-1.0</feature> </featureManager>
To find out more about the MicroProfile Rest Client in Liberty, see Andy McCright’s blog post on the OpenLiberty.io website.
MicroProfile Config 1.2
Building on version 1.1, MicroProfile Config 1.2 adds a number of new built-in converters, including
Set and automatic conversion for classes which have a suitable String constructor or static
valueOf method. You can use this feature with either the
cdi-1.2 feature or the
You can find a full list of changes since version 1.1 on the MicroProfile Config 1.2 Milestone.
The ConfigBuilder SPI has been extended with a method that allows for a converter with the specified class type to be registered (#205). This change removes the limitation in previous releases of being unable to add a lambda converter.
- Implementations must now support the array converter (#259). For the array converter, the programmatic lookup of a property (e.g.
config.getValue(myProp, String.class)) must support the return type of the array. For the injection lookup, an Array, List, or Set must be supported as well (e.g.
@Inject @ConfigProperty(name="myProp") private List<MyObject> propValue;).
- Implementations must also support the common sense converters (#269) where there is no corresponding type of converters provided for a given class. The implementation must use the classâ€™s constructor with a single string parameter, then try
- Implementations must also support Class converter (#267).
The API bundle can work with either CDI 1.2 or CDI 2.0 in the OSGi environment (#249).
To enable the MicroProfile Config 1.2 feature just add the following feature definition to your
<featureManager> <feature>mpConfig-1.2</feature> </featureManager>
For more information about MicroProfile Config 1.2, see the MicroProfile.io website.
MicroProfile OpenAPI 1.0
The MicroProfile OpenAPI 1.0 feature (
mpOpenAPI-1.0) is a preview implementation of the MicroProfile OpenAPI 1.0 specification. In this beta, we’ve added support for more mechanisms from the MicroProfile OpenAPI 1.0 specification. MicroProfile OpenAPI 1.0 now handles all configurable items, fully supports filter, and handles more annotations.
To try it out, add this feature to your
server.xml list of features:
<featureManager> <feature>mpOpenAPI-1.0</feature> </featureManager>
Then use one of the documentation methods. You can view the generated OpenAPI document in the endpoint
/openapi, or view the rendered user interface at the endpoint
CDI 2.0 is shining new and implements the latest CDI spec. It contains quite a few nice capabilities, especially the very useful and powerful Configurator SPIs. The new feature
cdi-2.0 pulls in the Weld bundle 3.0.2. The following features of CDI 2.0 are available for use:
- Asynchronous events
- Configurators for major SPI elements
- Configure or veto observer methods
- Add built-in annotation literals
- Apply interceptor on producers
To enable the CDI 2.0 feature just add the following feature definition to your
<featureManager> <feature>cdi-2.0</feature> </featureManager>
For more information about CDI 2.0, see the CDI spec.
Whatâ€™s already in there?
The January Liberty beta included MicroProfile OpenAPI 1.0 and JSON format logging.
For supported features, take a look at 126.96.36.199, which was released in December.
Looking for the latest?
If you’re visiting this post from the future and you’re looking for the latest releases of Liberty, here are the links you’re looking for: