Oracle Coherence
Published in

Oracle Coherence

Release Announcement

Coherence Spring 3.0.0 M1 Released

Photo of the Hualalai volcano with the sun breaking through clouds on the island of Hawaii with the words “Coherence Spring 3.0.0 M1”.
Photo: Hualalai volcano on the island of Hawaiʻi

The Oracle Coherence team is stoked to announce the release of Coherence Spring 3.0.0 M1. This is the first milestone release and represents a complete reboot of the Coherence Spring project.

This release is loaded with new features, helping Spring developers to substantially simplify the integration of Spring-based applications with Oracle Coherence.

We have refactored the bootstrapping mechanism to use the new Coherence Bootstrap API, allowing for a much simpler user-experience. When using Spring Boot, starting Coherence cluster member within the same JVM has become as easy as adding the Coherence Spring Boot Starter dependency to your project:

Adding Coherence Spring Maven dependencies

CoherenceAutoConfiguration will kick in, bootstrap Coherence, and you can immediately start injecting Coherence dependencies into your Spring-managed classes using a rich set of available annotations including:

  • @CoherenceCache
  • @CoherenceMap
  • Filter Binding Annotations
  • Extractor Binding Annotations
  • and many more

For instance, the following usage will inject a Coherence NamedMap called people:

Injecting a NamedMap

You can also inject other Coherence-managed objects such as:

Fine-grained customization of the configuration is of course possible if needed. We also provide initial support for dedicated Spring Boot configuration properties to customize the integration of Coherence. Additionally, we have added preliminary support for Spring Boot’s Config API in order to allow you to import additional configuration data using Coherence as a store of such configuration data by using the Spring Boot property spring.config.import with the value prefix coherence:.

The Coherence Spring team added support for Coherence server- and client-side events. As such, you can add Coherence event listeners with the @CoherenceEventListener annotation:

Example of a Coherence Event Listener

This example will listen to client-sideMapEvents for the map named people. Using the optional WhereFilter, the event listener will only be triggered for people older than 18 years of age using a CohQL expression.

Coherence Spring adds support for Spring Data repositories using the brand-new Coherence Repository API which has been introduced in
Coherence CE 21.06 M2. This allows you to use Spring Data with Coherence as a back end data store.

If you need to use Coherence for caching using Spring’s Cache abstraction, just add the @EnableCaching annotation and CoherenceAutoConfiguration will add a CoherenceCacheManager to the Spring ApplicationContext.

Now you can take advantage of Spring’s Cache abstraction that is backed by Coherence and use the relevant Spring annotations such as @Cacheable, @CacheEvict, @CachePut.

As part of this release, Coherence Spring is now licensed under the Universal Permissive License 1.0 (UPL 1.0), which is compatible with the Apache 2.0 license.

In this initial M1 release, we provide an initial version of our reference guide (60+ pages, HTML + PDF), including the Quickstart chapter.

The project source repository includes several sample applications. We have also provided the Coherence To Do List Example Application in a separate repo, as a more complete example of the integration of Spring Boot and Coherence. On the front-end, it provides REST and GraphQL APIs using either a React-based front-end or a JavaFX client application. For the backend, a Spring Data-based Coherence repository is used.

For the next Milestone 2 release we plan on adding support for:

  • Spring Session
  • Expanded Spring Data support (async repositories, projection support, and pagination)
  • Added support for messaging/topics
  • Port the Sock Shop micro-services demo to Spring

The final 3.0.0 release is planned for later this summer. For a complete list of changes, please see the Release Notes.

Lastly, we would love to hear from you! Now is the time to evaluate Coherence Spring, provide feedback and help to incorporate any suggestions for improvement. The best way to follow progress is the Coherence Spring GitHub repository. If you have questions, please join our Slack channel or ask questions on Stack Overflow. Coherence Spring is an open source project, and contributions are always welcome!