Webinar: Spring with Immutability

News | Chloe Jackson | November 13, 2013 | ...

Speakers: Matt Stine

Readers of Josh Bloch's "Effective Java" are sometimes perplexed when they reach Item #15: "Minimize Mutability." If we are to minimize mutability, then obviously we must maximize immutability. While all Java programmers utilize immutable objects every day (e.g. java.lang.String), when asked to create our own immutable classes, we often hesitate. However, if we push through this hesitation, we'll reap the benefits of simpler reasoning about program correctness, free thread safety, and other benefits.

One of the primary issues faced by enterprise Java programmers seeking to…

SpringOne2GX 2013 Replay: Troubleshooting Live Java Web Applications

News | Chloe Jackson | November 13, 2013 | ...

Recorded at SpringOne2GX 2013 in Santa Clara, CA.

Speaker: Ashley Puls, NewRelic

Operations teams tend to get nervous when debugging tools are installed on production systems. This is understandable as most people have had at least one debugging tool crash a system. However, are there tools that can be run in a production environment? This talk will cover methods and tools that can be used to uncover and resolve performance problems arising in Java web applications that use the Spring Framework. This talk will touch on a few common problems such as slow SQL, slow web page load times, blocked threads, and exceptions in the code. It will use a variety of diagnostic tools to examine these problems including log files, jmap, jvisualvm, and New Relic. Finally, the talk will evaluate the use of these tools in a production environment, separating them into what can and cannot be realistically used in live production web applications.

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

It can't just be Big Data, it has to be Fast Data: Reactor 1.0 goes GA

Releases | Jon Brisbin | November 12, 2013 | ...

I'm happy to announce that Reactor, a powerful foundational library for building reactive, fast data applications on the JVM has reached GA!

What is Reactor and why should I care?

Reactor provides the necessary abstractions to build high-throughput, low-latency--what we now call "fast data"--applications that absolutely must work with thousands, tens of thousands, or even millions of concurrent requests per second.

You should care about Reactor because modern applications with non-human consumers--like mobile phones and the apps that run on them--generate more data than traditional thread-per…

This Week in Spring - November 12, 2013

Engineering | Josh Long | November 12, 2013 | ...

Welcome to another installment of This Week in Spring! This week, I'm in Antwerp, Belgium talking to Spring, RabbitMQ, Tomcat, Redis, and Cloud Foundry users at Devoxx Belgium. We at Pivotal have a booth and are showing Spring Boot and giving away t-shirts. Be sure to stop by and say hi!

  1. Spring Boot 0.5.M6 is now available! The new release is full of amazing new features and you can use it from gvm and Homebrew, too.
  2. The Reactor project 1.0 has just been released! Project lead Jon Brisbin has done an amazing job with the new release and the blog is full of win, so be sure to check it out.

Spring Boot 0.5.0.M6 Released

Releases | Phil Webb | November 10, 2013 | ...

Spring Boot 0.5.0.M6 has been released and is now available in the Spring repo. Instructions for installing and using are on the project website or in github. There are loads of updates in this release, including:

  • Auto-configuration reports to let you know what Spring Boot is doing on your behalf
  • Remote shell support via CRaSH
  • Support for JDK 8
  • A new Aether based @Grab engine
  • Lots of bug fixes

Here is a quick example that demonstrates the remote shell and auto-configuration report:

@Grab("spring-boot-starter-shell-remote") 
@Controller 
class MyRemote {
}

When you run this application using spring run example.groovy you should see…

SpringOne2GX 2013 Replay: Inside Cloud Foundry - An Architectural Review

News | Chloe Jackson | November 08, 2013 | ...

Recorded at SpringOne2GX 2013 in Santa Clara, CA.

Speakers: Dekel Tankel - Pivotal, Christophe Levesque -AppDirect, Scott Motte - Sendgrid

Inside Cloud Foundry: An Architectural Review Cloud Foundry makes it easy to push an app, bind services to it, and scale it. Cloud Foundry takes care of the all the infrastructure and network plumbing that you need to run your applications and can do this while patching and updating systems and services without any downtime. This session will provide a deep technical tour of the architecture behind the latest version of Cloud Foundry that makes all this possible and will provide insights for anyone interested in large scale distributed systems.

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

Spring eXchange Nov 14-15, London

News | Chloe Jackson | November 06, 2013 | ...

Are you interested in the latest on Spring Framework 4 and Java 8, Web Socket architectures, running Spring applications that fit in a tweet with Spring Boot, tackling big data complexity with Spring XD, rich client apps with Spring and AngularJS and lots more?

With the dust settling on SpringOne2GX 2013, you have a great opportunity to catch up on all the great new project announcements and speak directly to the developers and the community that made them happen at the London Spring eXchange 14th -15th November.

Spring Exchange is a two-day conference bringing together the UK Spring…

This Week in Spring - November 5, 2013

Engineering | Josh Long | November 05, 2013 | ...

Welcome to another installment of This Week in Spring! I'm in Malmo, Sweden at the fantastic Øredev conference, talking to developers about Spring, Cloud Foundry, and more! I'll be at JMaghreb next week and then at Devoxx 2013 where I'll be talking to developers about Spring, Cloud Foundry, RabbitMQ and more along with my pals Dr. Dave Syer, Alvaro Videla, and Andy Piper. Looking forward to seeing you at any of these places! Ping me on Twitter (@starbuxman) if you want to talk Spring, the cloud, big data and anyting else!

With that, we've got a lot of really great stuff this week so let's get to it!

  1. First, the big news: Spring Framework 4.0 RC1 has been released! The new release includes full compatability with OpenJDK 8 developer previews, Groovy configured beans, improvements to Spring MVC, smarter proxies, time zone resolution (connected to JSR 310 and Joda-Time), Spring HATEOAS-inspired link-building, improved websocket support, and a lot more! Get the bits, test your apps, and be sure to let us know how you like it!
  2. Spring Security lead Rob Winch is at it again, this time with a Spring Security 3.2.0 RC2 release which includes resolutions for 80+ issues, and a slew of upates - some breaking, so to be sure to update and verify everything.
  3. Additionally, Rob's just released Spring LDAP 2.0.0.M1, which adds a lot of new functionality including Spring Data repository and QueryDSL support, a fluent LDAP query builder, a custom XML namespace for LDAP, Java 5 featues, and some restructuring
  4. P.S.: If you happen to be in the London area or with easy access to it, check out the Spring eXchange: a packed two-day show on Nov 14/15, with key Spring engineers presenting the latest and greatest - of course including Spring Framework 4.0!
  5. I gave a talk at JavaOne called the Spring Update that looks at a lot of the cool new things coming out of the Spring division at Pivotal. The talk is now online at Parleys.com so check it out!
  6. Paul Chapman's put together a very good post explaining error handling strategies in Spring MVC
  7. Daniel Lipp and Tobias Mattsson, from Magnolia, did a nice webinar introducing how to integrate the Magnolia CMS with Spring and Grails based applications. Cool stuff!
  8. Greg Turnquist continues the narrative on Spring Boot and talks about how to add property support to a custom Spring Boot module.
  9. Blogger Hébert Oliveira has put together an epic post on using Spring MVC, Spring Data, Spring Security, Bootstrap, and Angular.js together. Definitely worth a look!
  10. I'm excited to see Thymeleaf 2.1 support for automatic Spring Security CSRF integration. Nice job!
  11. Spring's documentation is now moving to Asciidoc! This is interesting mostly because it'll be easier to update and maintain the documentation now, and you can expect even better docs as a result!
  12. Spring Boot tip thanks to Dr. Dave Syer: any bean of type TomcatConnectorCustomizer in a Spring Boot application will give you a callback reference to the Connector which you can then use to customize the embedded Tomcat instance. One possible application of this is applying SSL to the embedded Tomcat instance.
  13. Speaking of Spring Boot, check out this Spring Boot Java app, a "full-featured" reference app that runs on @CloudFoundry that's designed to monitor builds. Nice job, Ben Hale!

Exception Handling in Spring MVC

Engineering | Paul Chapman | November 01, 2013 | ...

NOTE: Revised April 2018

Spring MVC provides several complimentary approaches to exception handling but, when teaching Spring MVC, I often find that my students are confused or not comfortable with them.

Today I'm going to show you the various options available. Our goal is to not handle exceptions explicitly in Controller methods where possible. They are a cross-cutting concern better handled separately in dedicated code.

There are three options: per exception, per controller or globally.

A demonstration application that shows the points discussed here can be found at http://github.com/paulc4/mvc-exceptions. See Sample Application

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

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