Josh Long

Josh Long

Josh (@starbuxman) is the Spring Developer Advocate at Pivotal and a Java Champion. He's host of "A Bootiful Podcast" (https://soundcloud.com/a-bootiful-podcast), host of the "Spring Tips Videos" (http://bit.ly/spring-tips-playlist), co-author of 6+ books (http://joshlong.com/books.html), and instructor on 8+ Livelessons Training Videos (http://joshlong.com/livelessons.html)

Recent Blog posts by Josh Long

This Week in Spring - January 21st, 2014

Engineering | January 22, 2014 | ...

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

Quick reminder: if you're in the San Francisco bay area, be sure to join me tomorrow evening at the Oakland JUG where I'll be speaking about Spring and Spring Boot!

  1. Join us on February 11th for a webinar introducing what's coming in Apache Tomcat 8.
  2. Join Spring Data engineers Oliver Gierke and Thomas Darimont on February 18 for a webinar introducing Spring Data repositories best-practices
  3. Check out the replay of Spring MVC ninja Rossen Stoyanchev's talk from SpringOne2GX 2013 on WebSocket Applications with Spring Framework 4.0.
  4. Check out the replay of Spring Security lead Rob Winch's webinar introducing Spring Security 3.2
  5. Check out Mattias Severson's SpringOne 2013 session replay reviewing Spring MVC test APIs.
  6. Spring Security lead Rob Winch has a nice post on how cookies can be exploited if not properly secured.
  7. Meanwhile, over on the Pivotal blog, C24 Founder and CTO John Davies gives us a look at how C24 is delivering high scalability for large financial-services companies with Spring, RabbitMQ, Pivotal, and GemFire.
  8. Les Cast Codeurs, a French language coding podcast (though, fairly well dominated by JVM technologies), interviewed Grails and Reactor committer Stephane Maldini, check it out!
  9. The Squadron blog has a nice post on how to use TLS (and the instructions are basically the same for SSL). This post is not specific to Spring, but if you're looking at Spring Security's X.509 support, then this article will be very useful.
  10. Mkyong is back with another post, this time on using TestNG with Spring.
  11. The Blas from the Pas blog has a nice post on how to use Thymeleaf and Spring MVC. You might also check out our guide on the subject.
  12. Andriy Redko has a nice post on how to use the Scala language sbt build tool with a simple Spring application. The thrust of this post is to introduce sbt, which is an alternative build tool to things like Maven or Gradle.
  13. The Develop and Conquer blog has a nice post on using Spring 4's websocket support.
  14. Our pal Xavier Padró is back, this time with a look at how to migrate XML-configured web applications to the recently released Spring 4.0
  15. Spring Data lead Oliver Gierke's talk from Geecon, Data Access 2.0? Please welcome Spring Data!, is now available online to watch. Enjoy!
  16. Jakub Kubrynski has a nice post on using Spring's Java-centric web configuration options.
  17. The Remove duplications and fix bad names blog has a nice post on unit-testing with Spring and Mockito.
  18. The Isos Tech blog has a post on the subject of using two JPA EntityManagers in one Spring application.

This Week in Spring - January 14th, 2014

Engineering | January 15, 2014 | ...

Welcome back to another installment of This Week in Spring!

As usual, we've got a lot to cover, so let's dive right into it!

By the way, due to overwhelming demand, we're going to repeat the webinar introducing Spring 4 with Juergen Hoeller on January 23rd. Watch this space for when we open up registration. The expected times are:

Thursday, January 23, 2014 - 3:00pm GMT Time (London GMT)

  • closed as of Jan 20th

Thursday, January 23, 2014 - 10:00am PST (San Francisco, GMT-08:00)

  1. The replay of Ben Hale's talk on RESTful API evolution from SpringOne2GX 2013 is now available online
  2. Spring and Groovy/Grails Tool Suite lead Martin Lippert just refreshed the most popular article ever written on JavaLobby, Spring IDE and the Spring Tool Suite - Using Spring in Eclipse. Check it out!
  3. Spring XD lead Dr. Mark Pollack has just announced that Spring XD 1.0.0.M5 is now available
  4. Oliver Gierke's talk from SpringOne2GX "Spring RESTBucks: a Hypermedia Driven REST webservice" is now available online.
  5. Following the crazy success of the Spring 4 webinar on the 9th, Spring project lead Juergen Hoeller has just written a blog detailing the next steps for the framework, including Spring 4.1 and Spring 3.2.7.
  6. Have you tried the crazy cool shell built into Spring Boot? It's powered by CRaSH, which you can learn more about in this video
  7. The replay from Gunnar Hillert and Michael Minella's talk from SpringOne2GX 2013, Integrating Spring Batch and Spring Integration, is now available online.
  8. Matt Stine webinar, Spring with Immutability, is now available online.
  9. Rob Winch just announced that Spring LDAP 2.0.0 is now available online!
  10. Our pal Eugen Paraschiv is back at it again, this time with a post on Spring's HttpMessageConverters.
  11. Jakub Kubrynski has a nice post on integration testing Spring Integration and Spring 4
  12. Gary Russell has just announced that Spring AMQP 1.3.0.M1 and 1.2.1 RELEASE are now available. The new release is very meaty, so if you're using it, I strongly suggest upgrading!
  13. Sproogle 0.3.0, which is an integration with Spring and parts of the Google stack (that don't so far as I can tell include the OAuth pieces that Spring Social Google takes care of), is now available.
  14. On the GoPivotal blog, Steve Greenberg has a nice post on how to add a service to your Cloud Foundry architecture using Spring. Nice! I've been waiting for something like this for a long time!
  15. Our pals on the Vaadin team are doing a webinar on Spring and Vaadin integration best-practices on January 30th, 2014. Check it out!
  16. A little late, but RestHub, which integrates a full Spring-powered REST and web application stack, has just released RESTHub 2.1.4. Check it out!
  17. Rest Assured, which provides an alternative testing API for REST services, has just released a new version that supports Spring MVC.
  18. New Relic has just announced dedicated Grails support.
  19. Zan Thrash did a nice talk on InfoQ about using Node.js ecosystem tools for client-side development along with Grails. The talk has very little to do with Grails, actually, and could as easily be applied to Java and Spring MVC development. These tools are front-and-center for many different types of web application developers, and this talk is a good primer.

SpringOne2GX 2013 replay: Data Modelling and Identity Management with OAuth2

News | January 08, 2014 | ...

Recorded at SpringOne2GX 2013 in Santa Clara, CA.

Speaker: Dr. David Syer

The OAuth2 specification (wisely) leaves a lot of areas open to interpretation and implementation details, so there are a lot of opportunities to impose interpretations on the flows and the underlying data. This presentation starts with a basic guide to the main features of OAuth2 and then goes on to show, with examples, how they can be exploited to support business and application use cases. For instance, should you encode access decision data directly in the access token, or make the token completely opaque? Should you be signing requests? What naming convention should you use for OAuth2 scopes? How do you go about registering users and clients? There are some obvious patterns in existing OAuth2 implementations, and Spring Security OAuth provides plenty of hooks and extension points should you wish to copy one of those, or make your own rules. Examples will use Spring and Spring Security to show how to take advantage of the inherent flexibility, both in the spec and in the libraries. Learn more about Spring Security OAuth: http://projects.spring.io/spring-security-oauth and Spring Security: http://projects.spring.io/spring-security

!{iframe width="420" height="315" src="//www.youtube.com/embed/nMdtYnSXRpw" frameborder="0" allowfullscreen}{/iframe}

SpringOne2GX 2013 replay: Spring RESTBucks - A hypermedia-driven REST webservice

News | January 08, 2014 | ...

Recorded at SpringOne2GX 2013 in Santa Clara, CA.

Speaker: Oliver Gierke

Spring MVC forms a solid foundation to implement REST based web-services in Java. However, in real-world projects developers still face challenges when it comes to advanced questions of REST. How to really leverage hypermedia? How to model more complex business functionality with REST. The talk introduces the Spring RESTBucks sample implementation of a hypermedia-driven REST web service and explains how it is using hypermedia elements to implement business processes and how Spring technologies (Spring Data REST, Spring Data JPA and Spring HATEOAS) help developers building the system. Learn more about REST at http://projects.spring.io/spring-framework/ (spring MVC's REST controller) http://projects.spring.io/spring-hateoas/ (Hypermedia Support)

!{iframe width="420" height="315" src="//www.youtube.com/embed/Y3rP4VT7qWM" frameborder="0" allowfullscreen}{/iframe}

This Week in Spring - January 7th, 2014

Engineering | January 07, 2014 | ...

Welcome back to another installment of This Week in Spring! Things are starting to ramp up considerably here on the Spring team. This week, on the 9th, we have the very anticipated Spring 4 release webinar Registration has been crazy! I'll be there, watching and helping to MC. I hope you'll be there too!

Also, if you're in the Bay Area, I'll be speaking at the Oakland JUG on January 22nd for a few hours in an evening we're calling Have You Seen Spring Lately?. We'll look at the epic last year's worth of awesome, including the release of Spring 4, Spring Boot and Spring XD. I hope you'll join us there, too! Bring questions!

  1. On Jan 16th, 2014, our Spring Security lead Rob Winch will introduce the Spring Security 3.2 release and talk about it's support for Java Configuration, CSRF Protection, Security Related HTTP response headers, optional Spring MVC integration, and of course, Spring Framework 4.0.
  2. Patrick Grimard has put together a nice post on using Spring Security 3.2.0's CSRF protection with a Backbone (or, really, any client-facing application). There is, as Spring Security Rob Winch points out, a simpler still way to achieve this.
  3. Feburary is Security month! We've just released a SpringOne2GX 2013 Replay: Data Modelling and Identity Management with OAuth2, with Dr. David Syer..
  4. On the REST front, also just released another SpringOne2GX 2013 Replay: Spring RESTBucks - A hypermedia-driven REST webservice, with Oliver Gierke.
  5. Roy Clarkson put together a great post on how to use WebJars, which lets you manage client-side dependencies like JavaScript using traditional JVM-based build-management tools like Gradle and Maven, along with Spring Boot.
  6. This post - about application instrumentation for logging, is a little old, but I thought it worth mention because it's generally pretty insightful and it demonstrates its concepts in terms of not only the canonical Spring Pet Clinic application, but also the Node.js Node Cellar, and the .NET Music Store. Not bad!
  7. Our pal Petri Kainulainen is back! He's written a nice post on how to use the JOOQ typesafe query API with Spring
  8. This post has so very little to do with Spring, but it does have to do with GemFire XD (our in-memory, distributed data-store that can work in-memory or with HDFS) and a bit of clever Python tinkering to access GemFire XD from Python.
  9. Did you see this epic post on running a Spring Boot-powered web service on a Raspberry Pi?
  10. Ned Lowe's put together a nice post on migrating from Spring MVC 2.0-style MVC applications to the annotation-centric approach available since Spring MVC 2.5.
  11. Thys Michels has put together a nice post on JUnit testing Spring MVC services.
  12. And thanks to the Learning Spring blog for the friendly reminder that Spring applications expose a lot of valuable logging for your exploitation if you simply modify the right configuration files.
  13. Tomas Zezula put together a nice post on Spring's @Primary annotation, which lets you disambiguate the choice for which dependency to use from among many possible dependencies.

This Year in Spring - December 31, 2013

Engineering | December 31, 2013 | ...

Happy New Year! Welcome back to this year's final installment of This Week in Spring!

We'll do some of the news, as usual, and then I'll take a look back over the last year in news surrounding Spring, of which there's been much indeed!

  1. Matt Raible, who we know has also been looking at Spring Boot, just wrote up our just-released Spring 4 for InfoQ. Definitely worth a read if you have the time!

This Week in Spring - December 24th, 2013

Engineering | December 25, 2013 | ...

Happy holidays! Hopefully with the holiday season comes some time off, and a chance to relax and more fully catch up on fun stuff you missed during a busy year. Readers of this column will know there are many channels for developers learning about Spring, and studying the field of technologies that Spring supports. Don't forget about our SpringSource YouTube page, Twitter account, our 15-30 minute "Getting Started" guides, the blog, and of course our Facebook and Google+ pages. I personally want to go back and watch as many SpringOne2GX talks on the YouTube channel as I can.

  1. Remeber JHipster? Julien Dubois's Yeoman-powered code generator for Spring applications? Well, 0.0.6 has been released and it has no required Spring XML (and Java EE's web.xml's the last one!) and provides code-generation support for services.

This Week in Spring (Spring 4 Edition!) - December 17th, 2013

Engineering | December 17, 2013 | ...

Welcome to another installment of This Week in Spring! This week, well, I'm taking some vacation :) That, of course, means that this week's roundup was even more fun for me - I got to play with the just-released Spring 4! And, to sweeten my vacation, the steady stream of new releases based on Spring 4.0 from the other Spring projects has already started!

If you're using Spring (Spring 4, Spring Boot, and anything else) and have some great new blog, video or sample project you think people should see, don't hesitate to share it with me on Twitter! Matt Raible has already made a helpful blog post: A Webapp Makeover with Spring 4 and Spring Boot where he upgrades his existing Spring 3.2.5, Spring Security 3.1.4 and Jersey 1.18 app to run Spring Framework 4 and Spring Boot.

  1. First, the BIG news! Spring CTO Adrian Colyer just announced that Spring 4 has gone GA! If you, like me, have been eagerly awaiting this all year, then don't wait a second longer! Grab those bits as soon as you can. Spring 4, of course, is the first major-version increment since Spring 3.0 back in 2009, and represents a major leap forward for application developers. Join Juergen Hoeller (and many other engineers) on January 9, 2014 for the launch webinar: Introduction to Spring Framework 4.0.
  2. Concurrent with the Spring 4 release, we've just added several new guides to the insanely popular Getting Started guides collection. Among the new guides, you'll find help on CORS, jQuery-, Sencha-, Angular.js-integration, and much more!
  3. Rob Winch followed very shortly after, announcing that Spring Security 3.2.0 RELEASE is available! Now, I'm going to finally update the code to my talk on using Spring's REST stack, along with Spring Security and Spring Security OAuth, to the new revision! Join Rob on January 16th, 2014 for a talk focused on the new release of Spring Security 3.2.
  4. Once Spring 4 was released, Spring Integration lead Gary Russell wasted no time in getting the long-awaited Spring Integration 3.0 out the door! This new release features many new improvements, which were mostly covered in the release candidate announcement.
  5. Projects lead Martin Lippert has just announced that Spring Tool Suite and Groovy/Grails Tool Suite 3.5.0.M1 are now available. This update revs to Groovy 2.2, Grails 2.3.4, and tc Server 2.9.4, and advanced content-assist for Spring Boot projects, improved dashboard feeds, and support for the new client-side getting started guides. This cut builds on Eclipse Kepler SR1. Check it out!
  6. Spring Data project lead Oliver Gierke has just announced the latest Spring Data release train, Spring Data Babbage SR2, has just been released. The service release bundles a bunch of important enhancements and bug fixes and is a recommended upgrade. You can find all issues fixed in this release in our JIRA
  7. Spring ninja Greg Turnquist put together a very nice look at the aforementioned Getting Started guides' migration to Asciidotor, behind the scenes.
  8. Spring ninja and Boot co-lead Phil Webb and I did a talk, Improving Your Java Configuration Muscle Memory, for SpringOne2GX 2013, which is now available as a replay on our YouTube channel. Check it out!
  9. Patrick Grimard's written a post introducing how to setup a Spring MVC interceptor to handle CORS requests. For more details on the subject of CORS, check out our Understanding CORS page, and then check out our new Getting Started guide which shows a Servlet Filter-centric alternative approach to basically do the same thing. This builds on Spring Boot, and uses a Filter instead of an interceptor, but the effect is the same.
  10. Our pal Bozhidar Bozhanov has written a great post all about web sockets, which of course work great with Spring 4!, complete with slides and codes! Be sure to check it out! This post uses a more low level approach to websockets, which Spring also supports, where all messages get funneled through one handler. Me personally, I like using the higher level STOMP support to avoid having to funnel all requests through the same handler, and then picking each request apart with a switch statement. Either way, this is a great post and - because it's lower level - gives you a better understanding of what's happening underneath the hood. Check it out!
  11. With a new release comes updated Maven artifacts. Last week, I mentioned that Spring 4 now features a very handy bill of materials Maven pom.xml. You should use that to simplify things. Additionally, if you're a BinTray user, be aware that the new release is already available there, as well.

50% off all Spring Books from Manning Dec 12th and 13th to celebrate Spring Framework 4.0 Release

News | December 12, 2013 | ...

Manning Countdown to 2014

In celebration of the Spring Framework 4.0 launch, Pivotal is excited to continue sponsoring Manning's "Countdown to 2014". We are offering 50% discounts for specific days, on books that are hand-picked by the Pivotal/Spring team. Manning is also making an additional offer to anyone that registers for the 2014 countdown - they are automatically entered to win one of two eBooks given away daily and a shot at the grand prize, an iPad Air.

Thursday, December 12 & Friday December 13th are Spring Days! (see below for book details)

Just go to manning.com and choose any (or all) of these selected books. Enter srgdotd13 in the Promotional Code box when you check out to get the discount.

You can read excerpts from books online for free by clicking on the links below. We hope you enjoy the deals!

Spring in Action, 4th Edition

By Craig Walls

 

Read except from Chapter 1

 

Spring Integration in Action

By Mark Fisher, Jonas Partner, Marius Bogoevici, and Iwein Fuld

Foreword by Rod Johnson

Sample chapter 3

Sample chapter 18

Spring Batch in Action

By Arnaud Cogoluegnes, Thierry Templier, Gary Gregory, Olivier Bazoud

Sample chapter 1

Sample chapter 5

 

Spring in Practice

by Willie Wheeler with Joshua White

Sample chapter 11

Sample chapter 13

RabbitMQ in Action

By Alvaro Videla and Jason J.W. Williams

Sample chapter 1

Sample chapter 8

RabbitMQ in Action

RabbitMQ in Depth

By Gavin M. Roy

 

Read Except from Chapter 1

RabbitMQ in Action

This Week in Spring - December 10th , 2013

Engineering | December 10, 2013 | ...

Welcome to another installation of This Week in Spring! This week I'm going to be in Los Angeles, talking to developers at Disney about Spring. If you're in the area, I'd love to see you all there, too. We're hosting a user-group meeting on December 11th. Here are some details on the event, which takes place tomorrow! I look forward to seeing you there!

Can you believe we're already staring down the end of the year? @_@

That means it's time for the annual release of Spring Framework, 4.0! We look forward to your feedback on the release.

Spring Framework

  1. Don't miss the Spring Framework 4.0 launch webinar, "Introduction to Spring Framework 4.0", with none other than Juergen Hoeller, on Jan 9th, 2014, first major Spring Framework release since 2009!
  2. Be sure to check out the webinar by busiest guy in code-business and Spring Security lead Rob Winch on Jan 16, 2014 to hear about Spring Security 3.2.
  3. Spring Framework committer and co-lead of Spring Boot Phil Webb introduces Spring 4's new support for Java generics in Spring 4.
  4. Thomas Darimont introduces what's new in Spring Data MongoDB 1.4 M1, including the phenomenal new projection framework and SpEL integration.
  5. If you're a user of the Spring-powered Broadleaf e-commerce engine, then you might want to register for the v3.1 web event.
  6. Our pal Tobias Flohre is back with yet another awesome post, Batch processing and the Java Enterprise Edition (JSR-352, JEE7, Spring Batch). The title speaks for itself - its a good quick overview of where the technologies sit.
  7. And, Petri Kainulainen is back at it again with an awesome followup to his series on adding social features to a Spring MVC Web Application with Spring Social. This post is on unit testing that integration.
  8. The @GoPivotal blog has an interesting case study of RabbitMQ's deployment at Norwegian Broadcast corporation.
  9. Speaking of Phil Webb and Rob Winch, one of the amazing things included in last week's announcement of Spring Framework RC2 was their wonderful addition of a "bill of materials" Maven POM: spring-framework-bom. Use it like this:

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-framework-bom</artifactId>
                <version>4.0.0.RC2</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    

    Then, simply import the version of the Spring dependency that you want without specifying the version in your pom.xml.

  10. There's another case study on the GoPivotal blog, this on now Hulu scaled serving 4 billion videos using Redis. That's awesome!

  11. Sudhir Dharmadhikari put together an interesting post on using Spring Roo's aspect approach the AndroMDA project
  12. Bozhidar Bozhanov, who I loved getting to see again last week in Sofia, has moved the Spring Social Google+ code to GitHub.
  13. Last but not least, It's Pivotal day at Manning!  
    

    All Spring and Groovy books half price on special deal days, to celebrate the Spring Framework 4.0 launch, Pivotal is sponsoring Spring and Groovy day in Manning's Countdown to 2014! On certain deal days like Monday Dec 9,10; Thursday Dec 12, 13; Monday Dec 23, 24; and Thursday Dec 26, 27, you can get any of Manning's Spring and Groovy books for half off-eBook, pBook, or MEAP. Just go to Manning.com and choose any (or all) of these selected books. Enter gpivdotd13 in the Promotional Code box when you check out to get the discount. BONUS: If you register for Manning's Countdown to 2014, you'll have a chance to win one of two eBooks given…

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all