The Spring Blog

Engineering
Releases
News and Events

What's new in Spring Data Lovelace for Redis and Apache Cassandra?

This blog post explains the new and noteworthy in Spring Data Lovelace for Apache Cassandra and Redis. Make sure to also check out the blog post on What’s new in Spring Data Lovelace for MongoDB?.

With Spring Data Lovelace just released in its generally available version last week, it’s time to have a brief walk through the new feature’s we have added. The release train is pretty packed with features.

In this blog post, I’ll be covering Apache Cassandra and Redis.

Spring Data for Apache Cassandra

With this release, we refined data access with Cassandra-specific types, introduced support for lifecycle events, improved the programming experience for both Java and Kotlin usage and included various other refinements. Let us take a look at how this release can help improve your data access to Cassandra.

Read more...

This Week in Spring (SpringOne Platform 2018 edition) - September 25th, 2018

It’s been such a crazy SpringOne Platform 2018 and we literally just started! I don’t even know where to begin! The show represents the convergence of the best and the brightest in the ecosystem. It’s absolutely amazing all the people who want and love to be here.

From our friends in the ecosystem, we see people from all organizations. IBM, Amazon Web Services, Microsoft and Google are all here hoping to make their platform the most compelling place to run Pivotal Cloud Foundry and Spring-based workloads. It’s great to see my friends from all these organizations! Friends like my friends Erin Schnabel, Emma Tucker, Billy Korando and Pratik Patel from IBM…

Read more...

Spring Cloud Function 2.0 and Azure Functions

Spring Cloud Function has had support for Microsoft Azure Functions since version 1.0, but in the latest 2.0 releases (still in milestone phase) we decided to change the programming model a bit. This article describes what the changes mean for users, and provides a bit of background behind the shift. We in the Spring team had a lot of fun working on this and collaborating with the folks at Microsoft to get the best blend of the two technologies for our users.

Azure Functions for Java

Microsoft has had Java support in Azure Functions for a while, and it enables developers to easily write and deploy Java code that connects in a serverless way to a wide range of platform services (events, databases, storage, HTTP gateways, etc.) in Azure. It comes with an annotation-based programming model that puts the function implementations in Java methods. So you write a method and annotation it with @FunctionName, and it becomes an Azure Function. There is a rich set of tools based on a Maven plugin (currently) that drives the Azure command line and can be used to build a function, run and debug it locally and deploy it to the cloud. There is a Quickstart Guide on the Azure website which will help you get all the pre-requisites installed and working, and there is more detailed documentation about how Azure Functions works in the Developer’s Guide.

Read more...

Hands on with Spring Vault 2.1

Spring Vault 2.1 is already in sight. I would like to use this post to take a deeper look at the changes and features that are in the upcoming release.

The team has been working on a whole bunch of new features:

  • Extending infrastructure-based authentication to support Google Cloud IAM and Azure Managed Service Identity

  • Integrating Vault’s versioned Key-Value backend

  • Wrapping API support

  • Java 11 compatibility

Spring Vault supports HashiCorp Vault versions 0.5 up to 0.11. You can find the Spring Vault and Spring Cloud Vault examples repository on GitHub. Now, let’s dive into the Spring Vault 2.1 features!

Read more...

Spring Data JDBC, References, and Aggregates

In my previous blog article, I described how to set up and use Spring Data JDBC. I also described the premise of making Spring Data JDBC easier to understand than JPA. This becomes interesting once you consider references. As a first example, consider the following domain model:

class PurchaseOrder {

  private @Id Long id;
  private String shippingAddress;
  private Set<OrderItem> items = new HashSet<>();

  void addItem(int quantity, String product) {
    items.add(createOrderItem(quantity, product));
  }

  private OrderItem createOrderItem(int quantity, String product) {

    OrderItem item = new OrderItem();
    item.product = product;
    item.quantity = quantity;
    return item;
  }
}
Read more...

Spring Boot for Apache Geode & Pivotal GemFire 1.0.0.M3 Released!

On behalf of the Spring and Apache Geode communities, I am pleased to announce the third milestone release of Spring Boot for Apache Geode & Pivotal GemFire (SBDG), version 1.0.0.M3.

The bits for 1.0 final GA are nearly complete. There will be 1 more development milestone (RC1) before final GA. The new 1.0.0.M3 bits can be acquired from the Spring libs-milestone repo.

What’s New

SBDG 1.0.0.M3 adds support for using Spring Boot’s Actuator feature with Apache Geode & Pivotal GemFire (and, by extension, Pivotal Cloud Cache, which is backed by Pivotal GemFire).

Read more...

Spring Web Services 3.0.4 / 2.4.3 released!

Greetings Spring community,

The Spring Web Services team is releasing two version at the same time. 3.0.4.RELEASE as the main branch of development along with 2.4.3.RELEASE for maintenance.

3.0.4.RELEASE comes with a handful of features listed further below. It also comes with new support for Java 11, the next long term supported version of Java.

Java 11 and beyond

Starting in Java 9, several key Java EE packages had their visibility reduced. These included core XML and SOAP-based packages. In Java 11, these packages have been removed altogether. Since Java 11 is the first long term release since Java 8, it’s the version Spring Web Services aligns with for corresponding long term support.

What does this mean for you? To use Spring Web Services on Java 9+, you can no longer depend on the JDK providing key XML and SOAP-based libraries. Never fear, the solution is right here!

If you visit the project’s build file, you’ll discover a new Java 11 profile. This profile contains the extra dependencies you must add to your own build file in order to use Spring Web Services (or any XML/SOAP-based library for that matter).

Spring Web Services does not ship these dependencies so you’ll have to add them to your own build file. But once you do, you won’t have to worry about again (except for when newer versions of those APIs are released).

Still using Spring Web Services 2.x maintenance branch? We’ve got you covered. Without breaking backward compatibility, the 2.4.3.RELEASE also supports Java 11. It just uses a slightly older version of the SOAP API (1.3.8 instead of 1.4.0). Nothing is forced upon you, so you can continue using the same versions of everything else.

Whether or not Java 11 breaks any parts of your application outside of Spring Web Services, of course, is up to you.

For more details, read the following release notes for each version:

Read more...

Announcing Spring Cloud Function - 2.0.0.M2

We are pleased to announce the second Milestone of the Spring Cloud Function - 2.0.0.M2.

Individual modules of Spring Cloud Function 2.0.0.M2 are available for use in the Spring Milestone repository.

Aside form general enhancements and bug fixes, the primary themes for this release are

  • Kotlin support
  • new programming model for Azure Functions (blog to follow)
  • automatic (optional) export of Supplier on startup in web adapter

How can you help?

If you’re interested in helping out, check out the “ideal for contribution” tag in the issue repository. If you have general questions, please ask on stackoverflow.com using the spring-cloud-function tag.

Read more...

This Week in Spring - September 18th, 2018

Hi Spring fans! Welcome to another installment of This Week in Spring! It’s the week before SpringOne Platform and things are crazy! We have so much to cover - as usual! - but FIRST! ..some poetry (with apologies to Clement Clark Moore)

’twas the week before SpringOne Platform, when all throughout Spring;
Not a creature was stirring, just the computers and things;
the expectations were raised by the community with care;
in hopes that SpringRod would be there;

That’s right! this year is fixing to be AMAZING! We’re going to have Spring founder Rod Johnson, Jenny Zhang, Siew Choo Soh, Neha Narkhede, Matt Raible, Ray Tsang, Lauren Knausenberger, Juergen Hoeller, Bruno Borges, Andrew Clay Shafer and allllll the rest of the Spring team! It feels like a minute ago (December!) that we just had the last one so I can’t believe how quickly this one has arrived, but I can’t wait!

Read more...

Introducing Spring Data JDBC

With the upcoming Lovelace GA release, we’re going to ship a new Spring Data Module: Spring Data JDBC.

The idea behind Spring Data JDBC is to provide access to relational databases without submitting to the complexities of JPA. JPA offers such features as lazy loading, caching, and dirty tracking. While these are great if you need them, they can actually make thinking about JPA and its behavior harder than it has to be.

Lazy loading might trigger expensive statements when you don’t expect it or it might fail with an exception. Caching can get in your way when you actually want to compare two versions of an entity and being dirty makes it hard to find a single point where all persistence operations pass through.

Read more...