The Spring Blog

Engineering
Releases
News and Events

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...

Bootiful GCP: To Production! (8/8)

Hi Spring fans! In this brief 8 part series we’re going to look at the Spring Cloud integration for Google Cloud Platform, called Spring Cloud GCP. Spring Cloud GCP represents a joint effort between Google and Pivotal that endeavors to provide a first class experience for Spring Cloud developers when using the Google Cloud Platform. Pivotal Cloud Foundry users will enjoy an even easier integration with the GCP service broker. I wrote these installments with input from Google Cloud Developer Advocate, and my buddy, Ray Tsang. You can also catch a walkthrough of Spring Cloud GCP in our Google Next 2018 session, Bootiful Google Cloud Platform. Thanks buddy! As always, I’d love to hear from you if you have feedback.

Read more...

Kotlin Support in Spring Cloud Function

Rarely we blog about a single feature, but given that this one was one of the most requested ones in Spring Cloud Function (relatively young project), we thought it may be appropriate, so here it is.

Initial support for Kotlin lambdas has been added to Spring Cloud Function. What it means is that Spring Cloud Function can now recognize Kotlin lambdas that effectively match to one of Java’s Supplier, Function or Consumer and treat them as such.

That is:

@Bean
open fun kotlinFunction(): (String) -> String {
    return  { it.toUpperCase() }
}

@Bean
open fun kotlinConsumer(): (String) -> Unit {
    return  { println(it) }
}

@Bean
open fun kotlinSupplier(): () -> String {
    return  { "Hello Kotlin" }
}

Read more...

This Week in Spring - September 11th, 2018

Hi Spring fans! Welcome to another installment of This Week in Spring! This week I’m in Istanbul, Turkey, talking to customers and participating in the epic SpringOne Platform Istanbul event and otherwise generally preparing for the flagship SpringOne Platform 2018 event in just a few short weeks

Read more...