close

Greg L. Turnquist

Greg L. Turnquist

Test-bitten script junky & Spring Data mate

Clarksville, TN USA

Greg is a test-bitten script junky. He is a member of the Spring Data team at Pivotal. He works on Spring HATEOAS, Spring Data REST, and Spring Boot, while also working as an editor-at-large of Spring's Getting Started guides. He launched the Nashville JUG in 2010. He has written three books (including Packt's best-seller "Learning Spring Boot") and recorded the "Learning Spring Boot Video". He has been a Spring fan for years.
Blog Posts by Greg L. Turnquist

Spring Web Services Samples have been updated!

Dear Spring community,

Spring Web Services Samples (spring-ws-samples) has been upgraded!

You might have known this, but many parts of this collection of samples goes all the way back to 2006. Today, I am happy to report it has been updated in a multitude of ways.

  • Introduction to Spring Boot

  • Introduction to Spring Data

  • Removal of outdated technologies

  • Removal of redundant samples

This was a hard-won task that took me several weeks, but based on the incredible persistence of SOAP, it was something that had to be done to serve the Spring community.

Read more...

Spring HATEOAS 1.1.1.RELEASE is out!

Dear Spring community,

Spring HATEOAS 1.1.1.RELEASE is out, the first patched release of the latest stable line, supporting Spring Boot 2.3.

Among many things, you’ll find:

  • We are now listing community-led efforts to implement other media types. JSON:API and Siren are the latest. You want to add another media type? Just check out the details.

  • VndErrors is a media type for reporting, well, errors. And it has had a sneaky bug that crept in that we’ve now patched. "logref" values are no longer confined to integers. It’s important to also note that the VndErrors spec is showing no signs of life, hence we’ve deprecated its support. If you’re starting a new hypermedia-driven project, our recommendation is to use RFC-7807’s application/problem+json format instead. The API is more elegant and more importantly, under active development. And we’ve made some fixes based on community feedback.

  • We are continuing to fix memory usage issues as more people crank out hypermedia links in more intense environments.

  • Spring HATEOS has de-lomboked the source code. This effort has been applied to the latest 1.2 and this version of 1.1 as well. (Versions predating 1.1 aren’t getting backports except in very special situations.)

Read more...

Spring HATEOAS brings you new ways to configure clients

Dear Spring community,

With Spring HATEOAS’s recent 1.1.0.M3 release, we bring you a new way to configure clients!

The first step in building hypermedia-based services may be configuring your server, which Spring HATEOAS has provided for a long time through its @EnableHypermediaSupport().

The next major step is building a client that can parse that hypermedia output. This has always been available, but it required you to know some of the deepest innards of the Spring Framework.

Until today.

With the latest version of Spring HATEOAS, it has been made much easier to configure RestTemplate, WebClient, or WebTestClient instances.

Read more...

Spring HATEOAS 1.0.0.RELEASE is released!

Dear Spring community, we’re proud to announce the general availability of Spring HATEOAS 1.0.0.

Here’s the summary:

  • Upgrade to Spring Framework 5.2.0.RELEASE.

  • Upgrade to Reactor Dysprosium-RELEASE.

  • Upgrade to Jackson 2.10.0.

  • Clarify expected behaviour around EntityLinks when using Spring WebFlux.

  • Fix i18n support to work in broader scenarios.

  • Update documentation to show how to create an ALPS serving controller for profile purposes.

  • Fix example in docs to reflect requirement for _prompt for property I18N.

  • Update reference docs to reflect new APIs, SPIs, and package structures.

Read more...

Spring HATEOAS 1.0.0.RC2 released

Dear Spring community, we’re proud to announce the second release candidate of Spring HATEOAS 1.0.0. Since our last release, Spring HATEOAS has made great strides with two more milestones and two RCs.

Here’s the summary:

  • Internationalization support for both HAL and HAL-FORMS.

  • Performance improvements

  • Spring HATEOS is now based on Spring Framework 5.2 and Reactor’s Dysprosium release train. This is critical to support downstream projects like Spring Data Moore and Spring Boot 2.2.

  • Now supports Spring WebFlux applications that have both hypermedia and non-hypermedia endpoints.

  • Improved major chunks of reference documentation.

  • Created a Spring HATEOAS Gitter channel.

  • Fixed issues in various media types to ensure they comply with spec definitions, and don’t throw unexpected exceptions.

Read more...

Spring HATEOAS 1.0 M1 released

Dear Spring community, we’re proud to announce the first milestone of Spring HATEOAS 1.0. Spring HATEOAS has been in development for almost seven years now. What started as tiny extension to Spring MVC became the foundation for Spring Data REST later on and has served as a fundamental building block for hypermedia based APIs in Spring MVC applications.

We received a lot of input for more advanced features from the community and eventually decided that it was time to integrate those into the library. Also, we gained a significant amount of experience using the library in the wild and thought we should take the chance to reflect those learnings in a 1.0 release.

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

Building richer hypermedia with Spring HATEOAS

Greetings Spring community,

As previously announced, we have released a new Affordances API in 1.0.0.BUILD-SNAPSHOT. In this blog post, we’ll take a peek at exactly what this feature lets you do.

History of Affordances

For starters, what is an affordance? Doing a little archeology, Mike Admundsen, a REST advocate, has an article detailing the word’s origins, going back at least to 1986:

The affordances of the environment are what it offers …​ what it provides or furnishes, either for good or ill. The verb 'to afford' is found in the dictionary, but the noun 'affordance' is not. I have made it up (page 126).
— The Ecological Approach to Visual Perception (Gibson)

It then appeared in a psychology paper in 1988:

…​the term affordance refers to the perceived and actual properties of the thing, primarily those fundamental properties that determine just how the thing could possibly be used. (pg 9)
— The Design|Psychology of Everyday Things (Norman)

Finally, it can be found in none other than one of Roy Fielding’s presentations on hypermedia in 2008:

When I say Hypertext, I mean the simultaneous presentation of information and controls such that the information becomes the affordance through which the user obtains choices and selects actions (slide #50).
— Slide presention on REST (Fielding)

In all these situations, "affordance" refers to the available actions provided by the surrounding environment. In the context of REST, these are actions detailed by the hypermedia.

In the past, when people moved away from SOAP and its action-based tactics, they have struggled to document their APIs, many unaware that Roy Fielding built hypermedia into REST for this very purpose. By including data along with the controls to not just find related data, but to also use the data is key.

With a HAL document, clients are provided very simple affordances. The links are shown but nothing else about them. What you can do with the links and what it takes to interact with them is not detailed.

Read more...

Spring Session (Core/MongoDB/Geode) 2.0.0.RC2 released!

Greetings Spring community,

In preparation for the soon-to-be GA release, Spring Session, Spring Session MongoDB, and Spring Session for Apache Geode and Pivotal GemFire have all aligned to versions 2.0.0.RC2 for this release.

In case you missed it, this is what’s included with each of the modules:

  • Core - includes support for Redis, JDBC, and Hazelcast

  • MongoDB - both traditional blocking as well as reactive support for MongoDB

  • Apache Geode - support for Apache Geode as well as Pivotal GemFire (including the PCC service with the SSC extension on PCF)

Read more...

Spring Web Services 3.0.0.RELEASE / 2.4.2.RELEASE is out!

Greetings Spring community,

Spring Web Services has released 3.0.0 for general availability as well as released a minor patch, 2.4.2.RELEASE.

As stated in the previous blog post, the 2.x series will be maintained as long as Spring Framework 4.x is supported, yet any new work will be conducted on the master branch.

The links below include related tickets.

  • 3.0.0.RELEASE:

    • Better handling of large attachments to avoid OutOfMemory exceptions.

    • Wss4jSecurityInterceptor enhancements including SAML callbacks

    • SpringSecurityPasswordValidationCallbackHandler improvement to avoid NPE from lack of a logged-in user

    • Fixes to SOAP 1.1/SOAP 1.2 message header handling

    • Fix content-type for Axiom SOAP 1.2

    • Upgrade to latest versions of AspectJ

    • Support for up-and-coming Axiom 1.3 (community contributor who wants to ensure Spring WS and Axiom 1.3 work together).

  • 2.4.2.RELEASE:

    • Backporting of the same SpringSecurityPasswordValidationCallbackHandler fix

    • Accidentally moved wss4j 2.x version too far forward to ensure stable compatibility. If you wish to use the very latest wss4j, you must move to the 3.0 version.

Read more...