The Spring Blog
News and Events

As I'm sure most readers are aware, Java SE 8 was released last month. In conjunction with the recent release of STS 3.5.0 and its complete support for JDK 8, we thought now would be an ideal time to upgrade Sagan to take advantage of the new language features and APIs.

Note: Not yet familiar with the Sagan project? It's the Spring reference application that powers this blog and everything else at Check out the first three posts in this series for more details.

Cloud Foundry's Java buildpack has provided support for JDK 8 since the day it was released. To begin using it, we've created our own fork of the buildpack, bumped the JDK version from 1.7.0 to 1.8.0, and configured our Gradle build to use our fork when deploying Sagan to production.


Spring Security OAuth 2.0.0.RC1 is available now from the Spring Repo. This is a huge step in the direction of modernisation and ease of use for OAuth server and client apps on Spring.

The headline feature is support for @Configuration(for OAuth2 only) and if you use Spring Boot to write your app you can serve tokens and protect the API resources in about 25 lines of code:

public class Application {

    public static void main(String[] args) {, args);

    public String home() {
        return "Hello World";

    protected static class OAuth2Config extends AuthorizationServerConfigurerAdapter {

        private AuthenticationManager authenticationManager;

        public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {

        public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
                    .authorizedGrantTypes("password", "authorization_code", "refresh_token")
                    .authorities("ROLE_CLIENT", "ROLE_TRUSTED_CLIENT")
                    .scopes("read", "write", "trust")



The Spring XD team is pleased to announce that Spring XD Milestone 6 is now available for download.

This is our biggest release yet! The team has been hard at work, and Milestone 6 contains a wealth of new features that meet enterprise requirements in terms of reliability, performance, and user experience. Below is a quick Top Ten (in no particular order), but if you checkout the release notes you will realize how difficult it is to pick out 10 from the list of 299.

  • Distributed and Fault Tolerant Runtime: Leader election among multiple xd-admin servers and automatic redeployment of modules to other xd-containers in the case of failure. ZooKeeper is introduced to manage the cluster and its deployment state.

  • Support for running XD on YARN: Run admin and container nodes on a Hadoop YARN cluster rather than on VMs or physical servers that you need to manage. There are simple configuration and shell scripts that make this process very easy.

  • Deployment Manifests: When deploying a stream you can provide a deployment manifest that describes how to transform the logical stream definition (e.g. http | hdfs) to a physical deployment on the cluster. You can specify the number of instances of each module to deploy and also a criteria expression (using SpEL) that evaluates each of the available containers in the cluster to determine the best matches for those module instances. This will be an area of active development for the next release as we extend the manifest to include support for data partitioning strategies.

  • Real-Time Evaluation of Machine Learning Scoring Algorithms: Integration with the JPMML-Evaluator library that provides support for a wide range of model types and is interoperable with models exported from popular data analysis packages such as R. Integration with other libraries is supported by providing an implementation of XD's Analytic and MappedAnalytic abstractions. Give it a try with the sample application based on the classic iris data set.

  • Updated UI: A redesign and rewrite of the UI that has a modern look and feel.

  • Enhanced DSL Auto-completion: Tab completion now works within the value of the --definition option when creating streams and jobs. Creating streams and jobs has never been easier. Try it out via xd-shell!

  • Default stream for the Batch Job lifecycle: Batch jobs are a source of event data. Add a tap to a Batch Job to receive events upon upon job success/failure, individual step actions or even item level actions. This functionality along with the support for launching jobs by sending messages to a named channel, enables your applications to have a complex event-driven flow between the batch and streaming domains.

  • Improved server and module configuration options: Server and module configuration have been separated to help with the life-cycle of upgrading them independently. Module configuration has been made more modular while allowing for shared configuration between related modules.

  • High performance TCP/UDP source: Based on the Reactor project - the Reactor IP source on commodity hardware can consume ~1 Million msgs/second.

  • FTP to HDFS job: Out of the box support for jobs to transfer files from FTP to HDFS. Those jobs take advantage of another new feature: partitioning of steps across multiple XD Containers.


Recorded at SpringOne2GX 2013, in Santa Clara, CA

Speakers: Josh Long

Alright, so maybe "bootiful" won't ever work, but I tried, and it was worth it too because you're reading this. Spring Boot, the new convention-over-configuration centric framework from the Spring team at Pivotal, marries Spring's flexibility with conventional, common sense defaults to make application development not just fly, but pleasant! Join Spring developer advocate Josh Long for a look at what Spring Boot is, why it's turning heads, why you should consider it for your next application (REST, micro services, web, batch, big data, integration, whatever!) and how to get started.


I am happy to announce the second service release of the Spring Data release train named Codd. The full list of participating modules looks as follows:


In my third post I discussed how to use WebDriver to make designing our tests easier with the Page Object Pattern. In this post, I'm going to discuss how to use Geb to make our testing with MockMvc more Groovy.

Why Geb and MockMvc

Geb is backed by WebDriver, so it offers many of the same benefits we got from WebDriver. However, Geb makes things even easier by taking care of some of the boiler plate code for us. Of course we want to use MockMvc so that we do no need to deploy our code to a server. The easiest way to understand the benefits of using Geb is to jump into an example.


Welcome to another installment of This Week in Spring! This week, I'm in Paris, France talking to developers about Spring Framework 4.0, Spring Boot, and more at Devoxx FR. Next week it's off to Bangalore, India for the Great Indian Developer Summit. As always, ping me online if you're around either location and want to talk Spring.

  1. Tuesday April 30th Webinar - don't miss Ashley Puls (New Relic) and myself as they track and trace through modern web apps: Web Application Diagnostics with Java and Javascript
  2. Tuesday April 22nd Webinar - see what stole the EclipseCon 2014 keynote: Martin Lippert and Mike Milinkovich demoing alpha versions of Project Flux: Connecting Eclipse to the Cloud-Based Era of Developer Tooling. Register today!
  3. Thomas Risberg and Janne Valkealahti show how they can use a single programming model / configuration model for Java MapReduce, Streaming, Hive, Pig, Cascading, or HBase in this SpringOne2GX 2013 Replay: Getting started with Spring Data and Apache Hadoop
  4. 90 minutes with Jags Ramnarayan and Anthony Baker at SpringOne2GX 2013: In-memory data and compute on top of Hadoop
  5. Check out Kevin Nilson (Google) and myself co-presenting at SpringOne2GX 2013 on Spring Profiles, and how it is an amazing tool for managing code through the normal dev/stage/production lifecycle: Multi Environment Spring Applications.
  6. I'm back with Roy Clarkson at SpringOne2GX 2013 talking about Spring Mobile/Android, REST/OAUTH and more in: Building Smart Clients with Spring
  7. Erdem Günay has put together a very nice post on how he used the Spring Expression Language (SpEL) and Spring Boot to dynamically send remote installation instructions to a wide array of Android clients, dynamically.
  8. Our pal Sam Brannen is going to be speaking at the Atlanta Spring User Group! One of the smart
  9. Moritz Schulze put together a very, very detailed post on how his company developed a time tracking, vacation-time managing application called Trackr with Java 8 and Spring Boot
  10. Mario Arias has put together a version of the Spring relational data Getting Started Guide using the Kotlin language. Kotlin is JetBrains' statically typed programming language to JVM byte codes and JavaScript. Very cool! I have never seen the kotlinprimavera module(s) before, but I dig it!
  11. Patrick Chanezon, director of enterprise evangelism at Microsoft, sat in on the vJUG meetup talk I gave on Spring Boot recently and set about hacking! The result is some guidance on how to deploy a Spring Boot application to Microsoft's Azure PaaS. Nice! Merci, Patrick!
  12. Hai Nguyen has put together a very nice post on how to configure / consume an embedded Jetty's JNDI-bound DataSource
  13. Did you miss Spring framework lead Juergen Hoeller's epic talk about Spring 4 and Java 8 from GOTO Amsterdam? Have no fear, you can watch it online!
  14. This is a particularly PaaSy This Week in Spring! Kim Saabye Pedersen has written a nice post on using Spring Boot on RedHat's OpenShift PaaS
  15. Our friend Petri Kainulainen is back, this time with a very nice post on using JOOQ with Spring. Petri's an amazing person to have in the community. I hope you don't need me to tell you that. Bookmark his site. It's almost always worth it.
  16. Our pal at Netflix, Tomás Lin, is back! This time he's got a post on bundling web content with Spring Boot and Gradle
  17. Michael Simons posted a very detailed post on how he's developing a Boot web application. Thanks for the detailed writeup, Michael. Very valuable feedback.

We are pleased to announce that the Spring Integration 4.0 release candidate (4.0.0.RC1) is now available. Please use the Milestone Repository with maven or gradle, download a distribution archive, or see the project home page for links to the updated documentation, and Maven/Gradle configuration details.

The release includes several bug fixes, some new features and further improvements with the GA release due near the end of April.

Here is a summary of major changes since the last milestone

@Poller and @InboundChannelAdapter


Recorded at SpringOne2GX 2013 in Santa Clara, CA

Speaker: Jags Ramnarayan, Anthony Baker

Hadoop gives us dramatic volume scalability at a cheap price. But core Hadoop is designed for sequential access - write once and read many times; making it impossible to use hadoop from a real-time/online application. Add a distributed in-memory tier in front and you could get the best of two worlds - very high speed, concurrency and the ability to scale to very large volume. We present the seamless integration of in-memory data grids with hadoop to achieve interesting new design patterns - ingesting raw or processed data into hadoop, random read-writes on operational data in memory or massive historical data in Hadoop with O(1) lookup times, zero ETL Map-reduce processing, enabling deep-scale SQL processing on data in Hadoop or the ability to easily output analytic models from hadoop into memory. We introduce and present the ideas and code samples through Pivotal in-memory real-time and the Hadoop platform.


Recorded at SpringOne2GX 2013 in Santa Clara, CA

Speakers: Thomas Risberg, Janne Valkealahti

Big data and Hadoop is widely considered to be the next generation data platform. Hadoop is notoriously difficult to work with and just diving in and starting coding can easily lead to frustration. A better way is to leverage your existing Java and Spring skills to take advantage of these new technologies. In this presentation we will introduce Spring Data for Apache Hadoop and see how it can make working with Hadoop easier. We will also cover several ways to install a small Hadoop cluster that can be used to test your new Hadoop applications.