Spring Team
Josh Long

Josh Long

Spring Developer Advocate

an aisle seat or San Francisco, CA

Josh Long is the Spring Developer Advocate. Josh is the lead author on Apress’ Spring Recipes, 2nd Edition, the O'Reilly "Pro Spring Roo" book, the Pearson "Livelessons for Spring" and a committer on several Spring projects and the Activiti BPMN framework. When he’s not hacking on code, he can be found at the local Java User Group or at the local coffee shop. Josh likes solutions that push the boundaries of the technologies that enable them. Josh's interests include big-data, mobile, REST, NoSQL and integration. He blogs on the Spring blog and [on his personal blog](http://joshlong.com).
Blog Posts by Josh Long

This Week in Spring - August 26th, 2014

Holy cats! Can you believe how close we are to SpringOne2GX? Last year we made a huge splash with the announcements of Spring Boot and Spring XD, both of which have recently hit 1.0 releases. I happen to know the next level looks like, and you're going to want to see it. Register now if you haven't already!


This Week in Spring-19th August 2014

Welcome to another installment of This Week in Spring! It's a few weeks before SpringOne2GX 2014, already! Time sure flies when you're having fun! The beginning of 2015 will mark the 4th year of This Week in Spring, and it's more exciting every week! I'm hoping to see as many of you as possible at SpringOne2GX 2014. This is sure to be an amazing event.

Anyway, with that out of the way, let's get on to this week's roundup!

  1. Spring Security lead Rob Winch just announced Spring Security 4.0.0.M2, which
    provides a lot of great features, including improved Security-aware testing support, Spring Data integration, support for websocket security, and ties into the nascent Spring Session projet that was derived from the work for this release. Check it out! Rob also announced Spring Security 3.2.5 and 3.1.7 which is a fix that closes a few potential security holes. This is good stuff, all around!
  2. Spring framework 4.1.RC2 just dropped. Spring 4.1 is very near completion, so be sure to check out the latest and greatest bits in this release!
  3. Christoph Strobl just announced the first RC for the Spring Data Evans release train. The new release includes a lot of features, including text search integration for Spring Data MongoDB, improved multistore support, configuration options for Redis sentinels, and much more.
  4. Our friends at Codecentric have just announced a new cut of their custom Spring Boot autoconfiguration for Spring Batch. This implementation is different than the auto-configuration provided out of the box with Spring Boot, and includes support for JSR 352.
  5. Netflix Developer Dan Woods recently gave a nice talk looking at what they hope to get out of the Spring Boot-based Grails 3, and the slide deck is definitely worth a look.
  6. The Being Java Guys blog has a nice post on how to build a REST service with Spring 4 and Hibernate 4. The example uses web.xml and Spring XML configuration. It's a working recipe, but I hope readers will remember that you can get the same done with Spring Boot in much less time and code.
  7. Oracle has particular support for Spring-based applications in WebLogic 12.1.3 which, I confess, I didn't know about. This is a pretty interesting read if you're on WebLogic.
  8. Tirthal's Java cafe blog takes a look at the recently announced Spring IO.
  9. This Vietnamese-language post on building a simple Spring-based web application was pretty straightforward, and worth a read.
  10. This post introduces how to integrate Spring Security 3.0.4 and GWT

This Week in Spring - August 12th, 2014

Welcome to another installment of This Week in Spring. We've got a lot of cool stuff happening and, as you might imagine, the entire team is abuzz in preparation for SpringOne2GX 2014, coming in just a few short weeks! If you haven't registered, now's the time to do so!

  1. Spring Security lead and all-around sleepless ninja Rob Winch has just announced that Spring MVC Test HtmlUnit 1.0.0.M2 has been released. This is an awesome release if you're trying to unit test real pages with Spring MVC
  2. Spring Boot 1.1.5 has just been released. The new release mainly addresses a few issues and is a recommended upgrade for all users.
  3. I really enjoyed this blog, ¿Qué es Spring Framework?, which tries to explain what the fundamental value of Spring is. Largely, the (Spanish language) article explains that Spring handles the lifecycle for objects in a consistent way. It's easy to plug in various frameworks, software, around the edges when the fundamental life-cycle is handled. I would point out that this post uses Spring 3.0 and XML configuration, which is a bit outdated, though certainly still works.
  4. The RebelLabs folks are back at it with an interesting look at web framework usage. Check out this latest report which has Spring MVC leading the charge (by a lot).
  5. This is a nice post looking at how to use Spring MVC (as part of Spring framework 4.x) to handle file uploads
  6. The Mr. Haki * blog has a nice post on analyzing dependencies using Gradle, with an example based on Spring Boot. Spring Boot, of course, is easy to get started with, can be used with Maven *or Gradle, and has numerous benefits, not the least of which being that it makes it dead simple to use Spring libraries in your project without worrying about version mismatches.
  7. Stuck on JAX-RS and JSF? Still want to use Spring Security? This post - from the JSF Usefullness post - has the code snippets that (sort of) demonstrate a path forward. Granted, you'll have an easier time of doing this using straight Spring. No need to add all that extra Java EE weight..
  8. This is a sort of oldie-but-a-goodie: a post on how to implement a JQuery-powered autosave example in Spring MVC
  9. This is a (particularly tortured) example of how to write a Spring application that uses Primefaces and runs on the Wildfly application server. I don't see why you'd need all this indirection when Spring has good JSF support out of the box. Additionally, there's no reason to recreate the JdbcTemplate or inject an ApplicationContext into a bean. Maybe it'll help somebody as a first-cut, though.

This Week in Spring - August 5th, 2014

Welcome to another installment of This Week in Spring! As usual, we've got a lot to cover so let's get to it.

  1. Spring Cloud lead Ramnivas Laddad has written up a nice post that looks at how to extend Spring Cloud to consume other services in a consistent manner.
  2. I liked Samer Abdelkafi's blog introducing how to use Java configuration with Spring. It's always a good time to review..
  3. The Pragmatists blog has a detailed look at the sort of (tortured) steps involved in using Spring with the Play! web framework
  4. Biju Kunjummen put together a great post that looks at how to deploy a Spring Cloud enabled application to Cloud Foundry
  5. Thys Michels is back at it again, this time with a post on building a ToDo application with Spring MVC and Angular.js
  6. I am really happy that this link is in this week's roundup, the author -Priyadarshini - did an amazing job! Check out this really thoughtful introduction to using Spring Boot to build a CRUD-capable Spring Boot-based application.
  7. The /dev/Kico blog has a nice Portguese-language post on what's new in Spring 4
  8. Ahmed Essam El-din Ahmed's roundup of the integrations for security among the various web frameworks - including Spring MVC - is fantastic.
  9. Did you know that Spring provides a StoredProcedure object that can be used to wrap and adapt the painful setup involved in invoking a stored procedure from JDBC.
  10. Theodora Fragkouli put together a nice post on how to handle Spring MVC form handling
  11. The ITEssays blog has a code recipe demonstrating how to use Spring Data MongoDB with XML configuration.

This Week in Spring (Spring XD Edition) - July 29th, 2014

Welcome to another installment of This Week in Spring! This week saw the release of the amazing Spring XD 1.0.0.RELEASE. The release announcement is a good place to start your big-data journey. There, you'll find links to other great posts, learning content, etc. This is a great opportunity to evaluate what you hope to get out of your data, and whether you're getting it. Spring XD is your big-data Swiss-army knife: it can support live, streaming workloads; batch-centric offline workloads; and general data integration solutions. If you digest but one post from this week's roundup, let it be the Spring XD release! (Then, write the data-integration solution to read and organize the rest of them using Spring XD!)


This Week in Spring - July 22nd, 2014

Welcome to another installment of This Week in Spring! This week we're at OSCON in beautiful Portland, OR! It's been a crazy busy week, and only figures to be busier! It's been nice visiting with colleagues and community members alike. The booth on the expo floor has been flooded with users. I love this show. :)

  1. First, the big news: the Spring framework 4.1 release candidate is now available! The new release features updated JSR-107 support, JMS 2.0 and annotation-centric JMS configuration, a SpEL compiler, and so much more.
  2. Spring XD co-lead Dr. Mark Pollack has just announced that Spring XD RC1 is now available. Installation is dead-simple. There are numerous new features, and this train's moving fast so check it out, download the bits, kick the tires, etc.
  3. Spring Data ninja Christoph Strobl put together a nice blog post introducing Spring Data MongoDB's full-text search
  4. The A Piece of My Code blog looks at how to use Spring's integration testing with mock services.
  5. Tousif Khan has put together a nice post on Spring's view controllers
  6. The Tech Zoo blog wrote up how to use Spring's Apache Tiles support
  7. The softwarecave blog introduces how to handle charts with jqPlot, Spring's REST support, AJAX and JQuery
  8. Theodora Fragkouli has written up a nice post on using Spring MVC's Errors tag
  9. I've just stumbled upon this JavaCodeGeeks academy trail on using Spring Data Redis - looks interesting.
  10. Want to use Spring, Hibernate 4, and Ehache together? Check out this tutorial.

This Week in Spring - July 15th, 2014

Welcome to another installment of This Week in Spring! It's been a crazy week and next week figures to be even crazier! Some of us on the Spring team - including Spring Boot co-lead Phill Webb, Spring Batch lead Michael Minella and myself, will be at OSCON next week, so if you're in the area and at the show come say hi! We'll be at the booth at various hours, too.

  1. Spring Batch lead Michael Minella has just announced Spring Batch 3.0.1, and a new Spring Batch extensions repository which itself houses new integrations with Spring Batch. The first contribution is an ItemReader and ItemWriter for Elasticsearch. Nice!
  2. Spring Data ninja Thomas Darimont has just announced support for SpEL in Spring Data JPA @Query annotations
  3. Spring and Groovy Tool Suite lead Martin Lippert has just announced Spring Tool Suite 3.6.0 and Groovy Tool Suite 3.6.0, based on Eclipse Luna 4.4, with support for Groovy 2.3, Grails 2.4, tc Server 2.9.6, and other minor improvements and bugfixes.
  4. Spring Data ninja Christoph Strobl has just announced Spring Data Evans m1, in which many new revisions are included.
  5. Speaking of the first milestone of Spring Data Evans, Spring Data REST ninja Greg Turnquist has just announced that Spring Data Evans M1 milestone comes with ALPS metadata support. FTA: ALPS provides a way to interrogate a RESTful service to find out about the data it serves. Let's look at a quick example. If you clone the TODO repo and run mvn spring-boot:run, you can surf it's values pretty easily. So.. check it out! I know many have been asking about simialar support.
  6. Check out this upcoming webinar by Michael Plod on why he recommends Spring - learn the technology (and a bit of the business) case! Michael is a great speaker and frequently appears at conferences. Register now for the event on July 22nd.
  7. On July 29th, Russ Danner from Crafter software will tell us about Conquering Content-enabled Web and Mobile Applications with Spring and Groovy.
  8. Andreas Eisele has put together a very nice introduction to the machinery behind using @Transactional in your Spring-managed unit-tests, with analysis of common scenarios, code, and more. Vert cool discussion, and a thoughtful post.
  9. The Cegega blog has a very cool look at handling exceptions using Spring Batch's RetryTemplate.
  10. This subject's near and dear to my hear this week, so I just wanted to share this oldie-but-a-goodie: how to use Atomikos with Spring's JTA support
  11. You are, of course, checking out Groovy-language lead Guillaume LaForge's This Week in Groovy, aren't you? :-)

This Week in Spring - July 8th, 2014

Welcome to another installment of This Week in Spring! I hope our American readers had a pleasant 4th of July, and I hope everybody else had a pleasant Friday!

There is, as usual, a lot to discuss this week so let's get to it!

  1. Sleepless Spring Security lead Rob Winch has just announced the first milestone of Spring Session. Spring Session makes it easy to access a session from any environment (i.e. web, messaging infrastructure, etc), support for clustering in a vendor neutral way, plug in strategies for determining the session ID, and easily keep the HttpSession alive when a WebSocket is active. This is really cool! And, in fact, it might solve an issue I faced just last week where I wanted to access the HTTP session from a Web Socket handler!
  2. Andy Wilkinson has just announced Spring Boot 1.1.4 release. The new release includes many bug-fixes and small new features, including support for the first stable preview release of Tomcat 8.
  3. Andy also just announced the first maintenance release to Spring IO which updates versions across the platform to include Spring AMQP 1.3.5, Spring Boot 1.1.4, Spring Batch 3.0.1, Spring for Apache Hadoop 2.0.1, and Spring Framework 4.0.6. Nice job, Andy!
  4. Thomas Risberg has just announced Spring for Apache Hadoop 2.0.1 which revs the dependency versions, including Hadoop 2.4.1, Spring framework 4.0.6.RELEASE, Spring Batch to 3.0.1.RELEASE, Spring Boot to 1.1.4.RELEASE.
  5. Stéphane Nicoll has just announced that Spring framework 4.0.6 is now available. This release includes about 50 bugfixes.
  6. Spring Social lead Craig Walls has just announced that Spring Social Facebook 2.0.0.M1 is now available. This release supports the new Facebook v2.0.0 Graph API, which introduces some breaking, obligatory, changes (thanks, Facebook!).
  7. Groovy project lead Guillaume LaForge has announced the beta of the new Groovy website and is soliciting feedback from the community at large.
  8. From the trenches: Join Casey Doolittle and Phil Dutson on July 15th for a webinar about a crazy project, and how they had to Build a Shopping Cart in 24 Hours using Spring.
  9. Check out this upcoming webinar by Michael Plod on why he recommends Spring - learn the technology (and a bit of the business) case! Michael is a great speaker and frequently appears at conferences. Register now for the event on July 22nd.
  10. On July 29th, Russ Danner from Crafter software will tell us about Conquering Content-enabled Web and Mobile Applications with Spring and Groovy.
  11. Last year, Spring tool ninjas Andy Clement and Martin Lippert did a great talk at SpringOne2GX 2013 introducing the latest and greatest tooling.
  12. Last year at SpringOne2GX 2013, Julien Dubois (you might recognise him from JHipster..) did a great talk looking at how to run and performance tune the classic Spring petclinic application.
  13. Dr. Dobb's had a nice post looking at the new Spring IO release.
  14. InfoQ's Matt Raible also put together a nice look at Spring IO. Check it out!
  15. The Literate Java blog has an interesting post on implicit (component-scan-centric) vs. explicit configuration (using XML) in Spring. I'd argue that Java configuration should really be considered as it offers the best of both explicit XML configuration (centralized, easy-to-reason about configuration) and implicit, but type-safe, Java annotation-and-component-scann-centric configuration. Either way, interesting post!
  16. Spring Boot is now in Thoughtwork's technology radar under assess.
  17. The Codeleak.pl site has a nice look at one of the smaller, but super powerful, features in Spring 4 - CGLIB proxies no longer require a default constructor!
  18. I've enjoyed this series of tutorials on using Spring and Angular.js. You might as well. Nice job, Christopher Henkel!
  19. The Apprenticeship Notes blog has a nice series of tutorials on how to use Spring MVC, Thymeleaf, and Bootstrap together.
  20. The Autoletics blog has a nice, numbers-filled, look at their experience profiling the Reactor project. Interesting stuff! Some of the points are interesting, too. As readers of this roundup know, Reactor is a highly concurrent event-driven IO-ready platform. And, it's ridiculously fast.
  21. I wanted to give a hat tip to Paul Snively, who has been using the 1-2 punch combo of the Spring (and Scala) and a third-party integration of Spring MVC for Alfresco to build Alfresco-powered solutions. Nice!
  22. Whether you like the new Groovy website or not (although, why wouldn't you?), you'll love the new Groovy 2.3.4 release which just dropped today and includes improvements on static compilation and AST transformations.
  23. HornetQ project-lead Clebert Suconic is inviting community feedback about a proposed contribution of HornetQ to the Apache ActiveMQ project. We know that developers in our community know and use both, so perhaps now's a prudent time to feedback if this proposed merger affects you! I personally like the idea. ActiveMQ.next (long codenamed "Apollo") seems like it could use the hug that a HornetQ-contribution could give it. And, of course, Spring Boot supports both ActiveMQ and HornetQ now, so either way, you're set!

This Week in Spring - July 1st, 2014

Welcome to another installment of This Week in Spring! It's already July, and Summer is here! Can you believe it? Time sure flies. We've got a lot to cover this week, as usual, so let's get to it.

  1. Last week, we announced the Spring IO platform. I won the lottery on this one, and they let me write the blog, but this effort reflects more than a year of internal discussion, planning, hard work, cooperation and coordination between all the Spring projects. I did my level-headed best to introduce the Spring IO platform in this blog. You should read it. If it doesn't sound awesome and very, very useful, than I've simply done a poor job explaining it! :D Don't hesitate to reach out. The Spring IO platform is a radically simpler way of dealing with dependencies across all the Spring portfolio projects. It's also a simpler logical model when using the Spring projects.
  2. Dr. Dave Syer just announced that Spring Boot 1.1.3 is now available. This is mainly a bugfix release affecting Windows users.
  3. Spring Data lead Oliver Gierke has announced Spring Data Dijkstra SR1. This includes 59 bugfixes across numerous modules.
  4. Want to use Spring Boot? So do a lot of people. And there are many ways to get started. I tried to document some of the common options - the Spring Initializr, STS, and others like JHipster - in this little blog
  5. There's a nice post on Zoltan's blog about Spring's flexible cache abstraction. The blog demonstrates how you might readily use a local cache like EHCache or a distributed cache like Hazelcast. Cool stuff! Also be sure to check out the great work coming in Spring 4.1's updates to the cache abstraction.
  6. As readers of this space will know, we (along with RedHat, Typesafe, Netflix, etc), are cooperating on the reactive streams project, which aims to provide a foundational layer for reactive applications. Our implementation is based on our Reactor project, which underpins Spring 4's very robust websocket support), for example. The Scalac.io blog has a nice example on how to use Typesafe's implementation of the collaboration along with RabbitMQ. The Reactor implementation shouldn't be too far along, and in the meantime, this is a nice look at one approach to working with RabbitMQ.
  7. Speaking of RabbitMQ, the Google Cloud Platform blog has a great post on how to setup a RabbitMQ cluster to handle over a million messages a second in a single click with Google's GCE (Google Compute Engine). That's super cool! It's nice to see RabbitMQ added to the staple of supported middleware on GCE. (I would be remiss if I didn't mention that Cloud Foundry and basically every other Platform-as-a-Service have simialarly painless setup for RabbitMQ, as well...)
  8. Helmet M. Juskewycz from Lingohub has just published a very cool blog on why Lingohub is moving from Ruby on Rails to Spring MVC. I should mention that even within Pivotal - a company with developers of all walks of life - we've seen some migration to Spring (and Spring Boot), as well!
  9. The Spring Security and Spring Data teams are cooking up some great stuff for us. Check out some of the work!
  10. I just found this post on how to add Spring framework to an Eclipse project. The steps provided aren't specific to Spring, though. I'd recommend you just use the Spring Tool Suite and go to File -> New -> Spring Starter Project. For more on how simple STS makes working with Spring, check out this introduction video.

Introducing the Spring IO Platform

We're pleased to announce the release of Spring IO 1.0!

Spring IO is first and foremost a logical description of what many of users will already know and use as a single, cohesive, harmonized platform, centered around Spring.

Big Things Come in Small (Java) Packages

The Spring IO platform includes Foundation Layer modules and Execution Layer domain-specific runtimes (DSRs). The Foundation Layer represents the core Spring modules and associated third-party dependencies that have been harmonized to ensure a smooth development experience. The DSRs provided by the Spring IO Execution Layer dramatically simplify building production-ready, JVM-based workloads. The first release of Spring IO includes two DSRs: Spring Boot and Grails. Spring XD will be added to the Spring IO platform later in 2014.