Spring Framework 3.2 M1 Released

Releases | Chris Beams | May 29, 2012 | ...

The first milestone release toward Spring 3.2 is now available from the SpringSource repository at http://repo.springsource.org. See here for a quick tutorial on resolving these artifacts via Maven.

This release includes:

This is also the first release since our move to GitHub and using our new Gradle build. A special thanks to the authors of the many pull requests submitted and merged during 3.2 M1! Keep them coming!

Download | Documentation | Javadoc API | Change Log | JIRA | Forum | Stack Overflow

Spring Roo 1.2.2.RELEASE available

Engineering | Alan Stewart | May 28, 2012 | ...

The Spring Roo team is pleased to announce the availability 1.2.2.RELEASE.  This is the second maintenance release for 1.2 and includes fixes for a number of issues and includes support for Spring Framework 3.1.1 and JDK 7.  Roo 1.2.2 also includes the excellent new "tailor" feature provided by our new partner, Accenture.

I hope you enjoy this new release!

Alan

Spring Roo Project Lead

SpringSource Tool Suite 2.9.2 released

Releases | Martin Lippert | May 24, 2012 | ...

Dear Spring Community,

 

We're pleased to announce the update release 2.9.2 of the SpringSource Tool Suite (STS).

 

This update release got updated to support and ship the just released vFabric tc Server 2.7 and includes a few bug fixes. More details on new features and bug fixes can be found in the New and Noteworthy document. Detailed installation instructions are also available. As always downloads are available from the STS download page.

 

Enjoy!

Transactions, Caching and AOP: understanding proxy usage in Spring

Engineering | Michael Isvy | May 23, 2012 | ...

In the Spring framework, many technical features rely on proxy usage. We are going to go in depth on this topic using three examples: Transactions, Caching and Java Configuration.

All the code samples shown in this blog entry are available on my github account.

Transactions

First step: no transaction

The Service class below is not transactional yet. Let’s first look at it as is and then make it become transactional.

@Service
public class AccountServiceImpl  implements AccountService {
 //…

//Not specifying a transaction policy here!
 public void create(Account account) {
 entityManager.persist(account);
 }
}

Since the method “create” is not transactional, it will most likely throw an exception (because this Account object should not…

This Week in Spring - May 22nd, 2012

Engineering | Josh Long | May 22, 2012 | ...

Welcome back to another installment of This Week in Spring. We have a lot of great content this week, as usual!

  1. Rossen Stoyanchev has put up another blog in his series on Spring MVC 3.2 Preview. This latest installment introduces a Spring MVC chat example.
  2. Oliver Gierke has announced the 1.1.0 GA version of Spring Data JPA. Spring Data JPA makes it very simple to build JPA-based repositories, saving you from the tedious boiler plate code. This new release includes new keywords for query generation (LessThanEqual, GreaterThanEqual, Before, After, StartsWith, EndsWith, and Contains), a handy PersistenceUnitPostProcessor to scan for JPA entities (to be used in Spring versions before 3.1), support for native queries in @Query, and support for declarative locking.
  3. Jonathan Brisbin announced the 1.0.0.M2 release of Spring Data REST. Spring Data REST let's you easily export your Spring repository objects as RESTful endpoints. The new release includes support for invoking query methods of Repository interfaces, support for JSR 303 and Spring Validator validations, and improved support for Spring ApplicationEvents that are emitted before and after each save or delete, and annotation-based configuration.
  4. Oleg Zhurakousky has announced the first milestone release of Spring Integration 2.2. This release includes dependency upgrades, JPA support, and support for "publisher confirms and returns," which are newly supported in Spring AMQP.
  5. Gary Russell has announced version 1.1.0 of Spring AMQP that includes support for the RabbitMQ 2.8.x client, which in turn supports mirrored queues, broker failover, publisher confirms, returns, federated exchanges, and much more.
  6. Matt Vickery has a great post introducing the Spring Integration splitter-aggregator pattern.
  7. Willie Wheeler has a great post up on his custom configuration management database (a CMDB). The post details the project, and then talks about his use of Spring Data's repositories in rebuilding the backend for CMDB. Nice post, Willie!
  8. Doug Haber put together a wonderful post on handling paging using Spring Data and the REST support in Spring 3.1.
  9. Blogger panbhatt has a detailed post on using Spring MVC's REST support to solve a particular set of problems he was having.
  10. Blogger OBSERWATORZY described his particular thought process when trying to consume a RESTful service, and wondering if Spring provided an answer (of course it did!). Read on for his resolution.
  11. Vishal Biyani has put together a nice introduction to getting started with Spring Roo and Cloud Foundry.
  12. The RabbitMQ blog has an amazing article introducing queueing theory (with an introduction to throughput, latency and bandwidth.
  13. JAXEnter has a nice roundup of some of the news releases described in this very post, including the Spring AMQP and Spring Data JPA's GAs.

Spring Integration 2.2.0.M1 is released

Releases | Oleg Zhurakousky | May 17, 2012 | ...

We are pleased to announce the first milestone release of Spring Integration 2.2 stream - Spring Integration 2.2.0.M1. Spring Integration provides an extension of the Spring programming model to support the well-known Enterprise Integration Patterns

Aside from the usual bug fixes this release brings quite a few new features and upgrades:

  • Dependency upgrades such as Spring 3.1.0.RELEASE, Spring AMQP 1.1.0.RELEASE, Spring Data Mongo 1.1.0.M1, Spring Gemfire 1.1.1.RELEASE
  • JPA support
  • Initial support for graceful shutdown of integration context
  • Support for 'Publisher Confirms and Returns' based on new features of Spring AMQP
  • etc.

This release also contains many improvements. You can see full release notes here

For more information about Spring Integration, refer to the project's home page

Spring AMQP 1.1.0 Released

Releases | Gary Russell | May 16, 2012 | ...

Spring AMQP provides the familiar benefits of the Spring programming model to AMQP and, specifically, Rabbit MQ.

We are pleased to announce the general availability of the 1.1.0 release of spring-amqp for Java, which supports the RabbitMQ 2.8.x client, providing the following features...

  • Mirrored Queues
  • Broker Failover
  • Publisher Confirms
  • Returns
  • Federated Exchanges
  • ...and more

For more information, refer to the project home page.

The Spring Integration 2.2.0 Milestone 1 release supports the features of this spring-amqp release.

Spring MVC 3.2 Preview: Chat Sample

Engineering | Rossen Stoyanchev | May 16, 2012 | ...

Last updated on November 5th, 2012 (Spring MVC 3.2 RC1)

In previous blog posts I introduced the Servlet 3 based async capability in Spring MVC 3.2 and used the spring-mvc-showcase and the Spring AMQP stocks sample to demonstrate it. This post presents a chat sample where the external events are not AMQP messages but rather HTTP POST requests with chat messages. In the second part of the post, I'll switch to a distributed chat where the events are Redis notifications.

Chat is not a common requirement for web applications. However it is a good example of a requirement that can only be met with real-time notifications. It is more sensitive to time delays than email or status alerts and it is not that uncommon to chat in a browser with a friend, or with a colleague during a webinar, or with a live person on a shopping site. You can imagine other types of online collaboration.

The Sample

The spring-mvc-chat sample is available on Github. Although not the focus of this blog post, the client side uses Thymeleaf, knockout.js, and jQuery. Thymeleaf is an excellent alternative to JSPs that enables clean HTML templates with support for previews allowing a designer to double-click an HTML template and view it unlike a JSP that requires a Servlet container. knockout.js is a client-side MVC framework that's very handy for attaching behavior to HTML elements. To get an idea about it quickly, follow one of its excellent tutorials. jQuery is used for DOM scripting and Ajax requests.

ChatController

The ChatController exposes operations to get and post chat message. Here is the method to get messages:


@RequestMapping(method=RequestMethod.GET)
@ResponseBody
public DeferredResult<List<String>> getMessages(@RequestParam int messageIndex) {

  final DeferredResult<List<String>> deferredResult = new DeferredResult<List<String>>(null, Collections.emptyList());
  this.chatRequests.put(deferredResult, messageIndex);

  deferredResult.onCompletion(new Runnable() {
    @Override
    public void run() {
      chatRequests.remove(deferredResult);
    }
  });

  List<String> messages = this.chatRepository.getMessages…

Spring Data REST 1.0.0.M2 Released

Releases | Jon Brisbin | May 16, 2012 | ...

Hot on the heels of the 1.1.0 GA release of Spring Data JPA, I'm pleased to announce the milestone 2 release of Spring Data REST. Besides many bug fixes, this M2 release includes a major update of functionality for the Spring Data REST exporter.

New functionality includes:

  • Query method support - Spring Data REST 1.0.0.M2 includes support for invoking query methods of Repository interfaces. Results are returned as links to top-level resources.
  • Comprehensive validation support - In addition to JSR-303 validation, the Spring Data REST exporter recognizes Spring Validator beans declared in your ApplicationContext to provide rich validation support. Your Validator beans can do anything--even look up other data to verify the integrity of an object graph.
  • ApplicationEvent handling - The exporter's validation support is built on top of the Spring ApplicationEvent mechanism. ApplicationEvents are emitted before and after each save or delete, allowing your code to tie into these lifecycle events and trigger other actions.
  • Annotation-based URL configuration - There is a new annotation: @RestResource you can place on a Repository interface or on a Repository's query methods to influence both the URL under which the resource is exported and the "rel" attribute associated with the links generated to point to that resource.

Starter Web Application | Wiki | Release Notes

To learn more about the project, visit the Spring Data REST homepage, or visit the Github repository to download the source.

Spring Data JPA 1.1.0 GA released

Releases | Oliver Drotbohm | May 16, 2012 | ...

Dear Spring Community, I'd like to announce the availability of the GA release of Spring Data 1.1.0. The overall release comes with 72 bugs fixed, improvements and new features. Here are the most important ones:

  • New keywords for query generation: LessThanEqual, GreaterThanEqual, Before, After, StartsWith, EndsWith, Contains
  • PersistenceUnitPostProcessor to scan for JPA entities (to be used with Spring versions before 3.1)
  • CDI integration for repositories (see here for details)
  • Support for native queries in @Query
  • Support for declarative locking

The release binaries are available via our Artifactory instance at http://repo.springsource.org and will be available in Maven Central in a bit as well.

Download | JavaDocs | Reference documentation (HTML) | Reference documentation (PDF) | Changelog

Looking forward to your feedback in the forums or the issuetracker.

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