Spring Team
Greg Turnquist

Greg Turnquist

Test-bitten script junky

Clarksville, TN USA

Greg is a test-bitten script junky. He is a member of the Spring team at Pivotal. He works on Spring Data REST, Spring Boot and other Spring projects, while also working as an editor-at-large of Spring's Getting Started guides. He launched the Nashville JUG in 2010. He wrote "Learning Spring Boot" and is currently recording "Learning Spring Boot Video". He has been a Spring fan for years.
Blog Posts by Greg Turnquist

Spring Web Services 2.3.1/2.4.0 are released

Greetings Spring community,

Spring Web Services has just released versions 2.3.1.RELEASE and 2.4.0.RELEASE.

2.3.1.RELEASE is a minor patch release.

2.3.1 Release Notes | 2.3.1 Documentation.

2.4.0.RELEASE rebases Spring Web Services to run on Spring Framework 4.2.x & Spring Security 4.0.x, the stable baselines behind Spring 4.3/Spring Security 4.1. At the same time, it remains compatible with Java 7. This version includes changes to the code base making it forward compatible with Spring 4.3 and 5.0, so you are free to move up to whichever version of Spring/Spring Security you wish to use.

Read more...

Spring Cloud Spinnaker 1.0.0.M1

Greetings Spring community,

I am happy to release the first milestone for Spring Cloud Spinnaker. Spring Cloud Spinnaker bundles up the continuous delivery Spinnaker platform, and provides a 1-click installer to let you install it to any certified Cloud Foundry provider.

At this year’s SpringOne Platform 2016 conference, there were two talks about Spinnaker. If you have early release access and missed them, you can watch right now. Otherwise you can catch them on the SpringDeveloper YouTube Channel once they are published.

Read more...

Reactor guides deprecated

Greetings Spring community,

There has been a lot of buzz in the past six months over Spring 5 and Reactive Streams support. I personally witnessed the number of questions Rossen received during his Reactive Spring MVC talk at DevNexus back in March. And his reactive talk at Spring I/O conference more recently was VERY popular to attenders.

Based on the huge leaps and bounds Project Reactor has made in the past two years, we are taking two of our guides down:

  • Creating an Asynchronous, Event-Driven Application with Reactor

  • Uploading pictures with Reactor

Read more...

Spring WS 2.3.0 is released

Greetings Spring community,

Spring WS has just released version 2.3.0.RELEASE. This is a major upgrade where we have updated several core dependencies such as Apache Wss4j 2 (from 1.6). I recommend upgrading to ensure you have the latest fixes. For a listing of completed issues see the report below:

Release Notes | Project Page | GitHub | Issues | Documentation

The artifacts are staged on maven central, http://repo.spring.io/release, and bintray.

Cheers!

Read more...

Check out our new tutorial -> React.js and Spring Data REST

Greetings Spring Community,

I hope you enjoyed my blog series on React.js + Spring Data REST. In that series, you got to build up a rich web app with hypermedia controls, conditional operations, messaging, and security.

To make things even better, that series has been bundled up and converted into a tutorial: https://spring.io/guides/tutorials/react-and-spring-data-rest/

Some key updates made along the way:

  • require.js has been replaced with webpack as the JavaScript module builder/loader of choice
  • The code is upgraded to ES6. This means that some of JavaScript’s newest features like classes, arrow functions, and more are being used.
  • bower has been replaced by npm as the package manager of choice
Read more...

React.js and Spring Data REST: Part 5 - Security

To see updates to this code, visit our React.js and Spring Data REST tutorial.

In the previous session, you made the app dynamically response to updates from other users via Spring Data REST’s built in event handlers and the Spring Framework’s WebSocket support. But no application is complete without securing the whole thing so that only proper users have access to the UI and the resources behind it.

Feel free to grab the code from this repository and follow along. This session is based on the previous session’s app with extra things added.

Read more...

React.js and Spring Data REST: Part 4 - Events

To see updates to this code, visit our React.js and Spring Data REST tutorial.

In the previous session, you introduced conditional updates to avoid collisions with other users when editing the same data. You also learned how to version data on the backend with optimistic locking. You got a tip off if someone edited the same record so you could refresh the page and get the update.

That’s good. But do you know what’s even better? Having the UI dynamically respond when other people update the resources.

In this session you’ll learn how to use Spring Data REST’s built in event system to detect changes in the backend and publish updates to ALL users through Spring’s WebSocket support. Then you’ll be able to dynamically adjust clients as the data updates.

Feel free to grab the code from this repository and follow along. This session is based on the previous session’s app with extra things added.

Read more...

React.js and Spring Data REST: Part 3 - Conditional Operations

To see updates to this code, visit our React.js and Spring Data REST tutorial.

In the previous session, you found out how to turn on Spring Data REST’s hypermedia controls, have the UI navigate by paging, and dynamically resize based on changing the page size. You added the ability to create and delete employees and have the pages adjust. But no solution is complete with taking into consideration updates made by other users on the same bit of data you are currently editing.

Feel free to grab the code from this repository and follow along. This session is based on the previous session’s app with extra things added.

Read more...

Check out the new "Creating CRUD UI with Vaadin" guide

Greetings Spring community,

Today we have published a new guide: Creating CRUD UI with Vaadin.

This guide, written by the Vaadin team, shows how to nicely build a UI that taps into Spring Data, but doesn’t require writing a single line of JavaScript or HTML code.

Vaadin is real cool:

  • Comes with its own Spring Boot starter
  • Works nicely with constructor injection
  • Makes it dirt simple to plugin persistence solutions like Spring Data
  • Is armed with an arsenal of plugins to grow into real applications

Check out this newly minted guide and have fun!

Read more...

React.js and Spring Data REST: Part 2 - Hypermedia

To see updates to this code, visit our React.js and Spring Data REST tutorial.

In the previous session, you found out how to stand up a backend payroll service to store employee data using Spring Data REST. A key feature it lacked was using the hypermedia controls and navigation by links. Instead, it hard coded the path to find data.

Feel free to grab the code from this repository and follow along. This session is based on the previous session’s app with extra things added.

In the beginning there was data…​and then there was REST

I am getting frustrated by the number of people calling any HTTP-based interface a REST API. Today’s example is the SocialSite REST API. That is RPC. It screams RPC…​.What needs to be done to make the REST architectural style clear on the notion that hypertext is a constraint? In other words, if the engine of application state (and hence the API) is not being driven by hypertext, then it cannot be RESTful and cannot be a REST API. Period. Is there some broken manual somewhere that needs to be fixed?

So, what exactly ARE hypermedia controls, i.e. hypertext, and how can you use them? To find out, let’s take a step back and look at the core mission of REST.

The concept of REST was to borrow ideas that made the web so successful and apply them to APIs. Despite the web’s vast size, dynamic nature, and low rate that clients, i.e. browsers, are updated, the web is an amazing success. Roy Fielding sought to use some of its constraints and features and see if that would afford similar expansion of API production and consumption.

One of the constraints is to limit the number of verbs. For REST, the primary ones are GET, POST, PUT, DELETE, and PATCH. There are others, but we won’t get into them here.

  • GET - fetch the state of a resource without altering the system
  • POST - create a new resource without saying where
  • PUT - replace an existing resource, overwriting whatever else is already there (if anything)
  • DELETE - remove an existing resource
  • PATCH - alter an existing resource partially

These are standardized HTTP verbs with well written specs. By picking up and using already coined HTTP operations, we don’t have to invent a new language and educate the industry.

Another constraint of REST is to use media types to define the format of data. Instead of everyone writing their own dialect for the exchange of information, it would be prudent to develop some media types. One of the most popular ones to be accepted is HAL, media type application/hal+json. It is Spring Data REST’s default media type. A keen value is that there is no centralized, single media type for REST. Instead, people can develop media types and plug them in. Try them out. As different needs become available, the industry can flexibly move.

A key feature of REST is to include links to relevant resources. For example, if you were looking at an order, a RESTful API would include a link to the related customer, links to the catalog of items, and perhaps a link to the store from which the order was placed. In this session, you will introduce paging, and see how to also use navigational paging links.

Read more...