News and Announcements  

News and announcements

Spring Data REST 1.1.0.M1 Released

The Spring Data team is happy to announce the next major step in the evolution of exporting domain objects to the web using RESTful semantics: Spring Data REST 1.1.0.M1 is now available in the SpringSource milestone repository.

Spring Data REST Home | Source on GitHub | Reference Documentation

Export domain objects to the web

Spring Data REST is a set of Spring MVC components that you can add to your own Spring MVC applications that export your Spring Data Repositories to the web using RESTful, HATEOAS semantics. It provides a consistent interaction API by exporting repositories to RESTful URLs that are configurable in a couple different ways.

Spring Data REST supports CRUD for top-level entities (those domain objects directly managed by a Spring Data Repository) by literally writing a single line of code that defines an interface that extends Spring Data's CrudRepository interface. That done, your entities then have full RESTful semantics. You can create new ones, update existing ones, and delete them using standard URLs that are, following the principles of HATEOAS, discoverable. That means the user agent accessing your Spring Data REST application doesn't need to have advance knowledge of what resources you are exporting. It can discover what entites exist and what relationships exist on those entities by successive calls to URLs provided in the JSON. These "links" are the real foundation and power of a HATEOAS REST application.

Changes from the ground up

Version 1.1 is virtually a re-write from the ground up. Not only is it easier to configure than 1.0 and better conforms to Spring MVC expections for the transition to Spring 3.2, but the biggest change in the internals of Spring Data REST is that it now supports other types of Spring Data repository implementations beyond just JPA. The HTTP semantics for CRUD and manging relationships (if the datastore supports it) remain the same no matter what backing datastore is used.

That means it's now possible to export JPA entities and MongoDB entities within the same Spring Data REST application and access those entities using a common URL structure and using the standard Spring HATEOAS Resource representation for all entities and collections. The user agent accessing those RESTful URLs does not need any special knowledge on which datastore the backing entities are managed by and, most importantly, you don't have to write any code to get that functionality!

MongoDB support

Spring Data REST 1.1 now supports exporting MongoDB CrudRepository implementations. The same HTTP semantics apply to MongoDB @Document entities as apply to JPA entities. GET, POST, PUT, DELETE are of course supported, but so is @DBRef. You can view and manage the relationship between two documents using GET, POST, PUT, and DELETE and you can export finder methods based on your @Query definitions. Please reference the spring-data-mongodb reference documentation for the full details of how the object mapping differs from JPA style mapping and how query definitions work.

Gemfire support

Spring Data REST 1.1 now supports exporting entities that use the high-performance Gemfire database to different Regions. Read the Spring Data Gemfire documentation for the full explanation of the vast configuration options and how POJO mapping in Gemfire differs from other mapping technologies.

Neo4J support is next

Spring Data REST 1.1 is now set to support Neo4J GraphRepositorys with the next version of spring-data-neo4j, version 2.3. When that's generally available (which should be around or before the general availablity of Spring Data REST 1.1 RELEASE), you will be able to access @NodeEntitys and their relationships using standard HATEOAS semantics, just like you do with the other datastores.

Add it to your existing apps

Spring Data REST is designed in such a way that you can, if you wish, create an entire application for the Spring Data REST application. It's just a standard Spring MVC webapp after all. But things get really interesting when you add Spring Data REST to your own services.

Spring HATEOAS author Oliver Gierke has created an example application that demonstrates the use of HATEOAS principles in a modern web application. It's called spring-restbucks and is an implementation of the Restbucks application described in the Systematic Theology of REST services: REST in Practice by Jim Webber, Savas Parastatidis and Ian Robinson.

Mixin REST services

By mixing Spring Data REST with your other RESTful services, you can get a seamless integration between those domain objects exported by Spring Data REST--objects for which you didn't have to write any code to have them exposed--and those services that don't represent an actual entity but a process. You can see an example of how a payment service might interact with domain object CRUD in the spring-restbucks application, where credit card payment processing is handled by a custom controller, while object CRUD is handled by Spring Data REST. Your custom controllers can actually piggyback onto the Spring Data REST URLs so that a consistent and simple URL structure can be maintained throughout the appliation, no matter whether the URL refers to your custom controller, a Spring Data REST JPA Repository, or any of the other supported Repository styles.

It's not exclusive

It's not an either-or with Spring Data REST. If you don't want all of your Repositories exposed to a web client, no problem! There a several different ways you can turn off functionality for Repositories. You can embed annotations into your source code or, if you don't have access or simply can't add the Spring Data REST annotations, you can use a fluent, DSL-style configuration to tell Spring Data REST how your resources should be exposed. Using Spring Data REST in your application isn't an exclusive committment to only one way of doing things. Spring Data REST is structured in a what that it will play nicely with your existing application so you can incorporate those bits of functionality from Spring Data REST you want, while still maintaining all the custom-coded services you're used to creating in Spring MVC controllers.

JSONP support moving to a filter

The JSONP support that was built into Spring Data REST 1.0 has been removed from the core framework in preference to a forthcoming general-purpose JSONP Serlvet Filter that will work much better than the way JSONP was implemented in version 1.0. When that filter is generally available, then JSONP support can be added not just to Spring Data REST, but virtually any Servlet-based REST resource.

Installation and Documentation

To get started playing with Spring Data REST, have a look at the reference documentation to get the lay of the land, so to speak, and get started playing with it in your own application by simply adding a dependency to the spring-data-rest-webmvc artifact (currently at 1.1.0.M1 in the SpringSource milestone repository) then import the Spring Data REST configuration like you see being done in the spring-restbucks application.

Learn more at CONFESS_2013

If you're planning on attending CONFESS_2013 in Vienna the first week of April, then you can hear all about Spring Data REST at my talk on exporting entities to the web.

Links

Spring Data REST Home | Source on GitHub | Reference Documentation

Spring Tool Suite and Groovy/Grails Tool Suite 3.2.0 released

Dear Spring Community,

we are happy to announce the next major release of our Eclipse-based tooling today: The Spring Tool Suite (STS) 3.2.0 and the Groovy/Grails Tool Suite (GGTS) 3.2.0.

Highlights from this release include:

  • Eclipse Juno SR2 updates (including Mylyn, EGit, m2e, m2e-wtp)
  • added support for high-res displays on Mac OSX
  • updated bundled tc Server to 2.8.2
  • major performance improvements for working with Spring projects
  • major improvements to the Live Spring Beans Graph
  • added support for Spring Integration 2.2
  • updated to include Groovy 2.0.7 and Grails 2.2.1 (Groovy 2.1 is available from the dashboard)

We continue to ship distributions both on top of Eclipse 3.8 and Eclipse 4.2. While the 4.2 stream of Eclipse has improved a lot in the Eclipse Juno SR2 release, we still recommend using the 3.8-based version for optimal performance and stability.

To download the distributions, please go visit:

Detailed new and noteworthy notes can be found here: STS/GGTS 3.2.0 New & Noteworthy.

Updates from STS/GGTS 3.0.0 and 3.1.0 are available through the automatic "Check for Updates". Users of STS 2.9.x (or older) should start with a fresh installation of STS/GGTS 3.2.0.

The next version 3.3.0 is scheduled to arrive in July 2013, shortly after the Eclipse Kepler (4.3) release. Also watch out for milestone builds of 3.3.0 if you want to stay up-to-date with the latest developments.

Enjoy!!!

Spring Integration 2.2.2 is Now Available

We are pleased to announce that Spring Integration 2.2.2.RELEASE is now available.

This is a minor release containing a few important bug fixes.

The release notes can be found here.

The project page is here.

This Week in Spring - March 5th, 2013

Welcome back to another installment of This Week in Spring. We've got a lot to cover, though, so let's get to it!

  1. I'm presenting a webinar on March 14, 2013 - Multi Client Development with Spring! Join me to learn about REST, OAuth, Spring MVC, Spring Android, and much more!
  2. Join Damien Dallimore and David Turanski on a webinar as they introduce the Webinar: Extending Spring Integration for Splunk - March 28th, 2013
  3. New SpringOne2GX replays now available in HD on YouTube: Spring Data Repositories: A Deep Dive, and Intro to Cascading
  4. @SpringSource is launching a (quick) swag-giveaway campaign!
  5. Spring Security lead and ninja Rob Winch has announced the initial support for Java-based configuration in Spring Security. This is a wonderful milestone. Recently, we've seen Java-configuration alternatives to the XML DSLs offered for Spring Social, Spring Batch and - now - Spring Security. Check out the Spring Security Java-based configuration for more details.
  6. I had the unique privilege of visiting the Alibaba group in China where they're doing some amazing things with Spring. Read more in my blog, Spring at China Scale: the Alibaba group.
  7. Someone asked me this the other day and I felt like it was worthy of a mention: in your Spring MVC @Controller class handler methods, make sure that the BindingResult argument is immediately after the model or command argument, like this: @RequestMapping(...) public String handleRequest( @ModelAttribute @Valid YourCustomPojo attempt, BindingResult result). In this example, handleRequest will validate the POJO (YourCustomPojo) - checking the POJO for JSR303-annotations and attempting to apply the constraints because the POJO is annotated with @Valid - and stash any errors in the BindingResult, which it makes available if we ask for it.
  8. Speaking of validation using JSR 303, I found this amazing post from 2010 that I felt worth inclusion. This post introduces a custom annotation, called @SpelAssert, that works like JSR303's @ScriptAssert.
  9. Do you want to use Cloud Foundry with the continuous integration capabilities offered by CloudBees? We got you covered! The Cloud Foundry and Cloud Bees teams worked to integrate the process, and the step-by-step introduction is given here.
  10. Alvaro Videla has introduced and open-sourced his RabbitMQ simulator. The RabbitMQ simulator is an awesome visualization tool to demonstrate how RabbitMQ topologies work.
  11. Gary Russell has announced that Spring AMQP 1.1.4 is now available.
  12. The Fstyle blog has an interesting post on how to unit test Spring Security with Spring MVC test mocks.
  13. Our pal Boris Lam is back, this time with a post on how to integrate Spring Data, MongoDB and JavaServer Faces.
  14. Indika Prasad, on the Programmer's Guide blog, has put together a tutorial showing how to use Spring Security with Webdav and password encryption.
  15. The Java J2EE SOA Key Points blog has a nice post on using the Spring WS JAXB web service client. There's very little narrative, but lots of code.

Spring-AMQP 1.1.4.RELEASE is now Available

We are pleased to announce that Spring-AMQP 1.1.4.RELEASE is now available.

This is a minor maintenance release with fixes to a few minor issues in the AMQP Log4j Appender, as well as correcting an issue in the spring-rabbit manifest for OSGI users.

Release notes can be found here.

The project home page is here, where you can find links to documentation, downloads and APIs.

This Week in Spring - Feb 26th, 2013

Welcome to another installment of This Week in Spring! It's been an exciting two weeks for Hadoop content - Hadoop enthusiasts should check last week's post for an HD quality replay of Building Big Data Pipelines with Spring Hadoop from SpringOne 2GX 2012.

  1. Costin Leau has announced that Spring for Apache Hadoop 1.0 has gone GA! This marks the end of a year in development from the time of the first betas. There's a lot in this release. For more information, check out the blog.
  2. Did you guys hear about yesterday's announcement from about Pivotal HD, a Hadoop distribution which performs better than the competition, provides a true SQL interface, and features extra tools (like an admin console and an installation, configuration and management facility) and is bundled with Spring for Apache Hadoop? The release was in the news a lot yesterday. Here's a nice post on GigaOm, another on CIO , and yet another on CRN and another still on Silicon Angle.
  3. SpringOne2GX 2013 has been announced! This year, SpringOne will occur in Santa Clara, California, on September 9-12th, 2013. I hope to see you there!
  4. Join me, Josh Long, for the upcoming webinar - Multi Client Development with Spring - on March 14th. The webinar will introduce how to build RESTful, Spring-based applications using Spring MVC, REST and mobile technologies like Spring Mobile and Spring Android and HTML5.
  5. Join Damien Dallimore (Splunk) and David Turanski (SpringSource) on March28th for a webinar, and hear them introduce the Spring Integration Channel Adapter for Splunk!
  6. Are you a JPA user? Weigh in on the JPA TCK Access debate and help improve TCK quality!
  7. Three new SpringOne2GX 2012 recordings available on YoutTube in HD this week: Getting started with Spring Data and Distributed Database Grid, Whoops, Where did my architecture go? and Monitoring and Managing Spring Integration.
  8. If you missed the Testing Web Applications with Spring 3.2 Webinar with Sam Brannen and Rossen Stoyanchev, you can see it in HD on YouTube.
  9. Nicolas Frankel put together a post that demonstrates how to change the default scope of beans. Beans are singleton scoped if no scope is otherwise specified. This example uses a Spring framework BeanFactoryPostProcessor to achieve the effect. NB: this is not something I'd recommend doing! This is super hackety. It is, however, a nice illustration of just how flexible Spring is.
  10. Petri Kainulainen put together a nice tutorial on configuring Spring Data Solr.
  11. CORS, or cross-origin resource sharing is a technique for communicating across hosts, sidestepping the single-host policy limitations typical of Ajax communication. Spring MVC doesn't support it out of the box, but it's easy to add to an existing application, as this tutorial explains.
  12. The Agitech Limited blog has an introduction to Spring MVC tutorial that you might find interesting.
  13. Pas Apicella has written a very nice post on using Spring and MyBatis, along with VMware SQLFire .
  14. The Cloud Counselor blog has a nice post on how to use Spring and GemFire together, complete with the working GemFire configuration files.
  15. Vincent Devillers introduces the cloudfoundry-runtime's Java types, letting you configure Cloud Foundry applications in Spring using Java (and Java configuration)
  16. The Java Journal blog has put together a nice post on using JDBC from Spring. Spring's long since featured the support described in this blog, so hopefully you've at least heard about these facilities in the core Spring framework before! If you haven't, then check out this post.
  17. The all and sundry blog is back, this time with a post on XML vs. Java-based configuration styles in Spring.
  18. The VmwareNews.de blog has a nice post on the new VMWare vFabric reference architecture.
  19. The aptly-named Solutions to basic IT problems blog has a nice post on Spring Data JPA. This is a follow-up from his previous post, which introduced the Spring and Hibernate combination.
  20. The ComSysto blog has a nice post specifically on visualizing Spring Data Neo4j nodes in JavaFX
  21. Krishna's Blog has a nice post on JUnit testing Spring MVC applications.
  22. The Techi Ghost blog has an interesting post on how Spring's ApplicationContext-wide eventing mechanism works. The event mechanism, by the way, is one of the things that should be greatly improved in the upcoming Spring 4.0 release, due at the end of this year.

This Week in Spring - Feb 19th, 2013

This Week in Spring - February 19th, 2012

Welcome back to another installment of This Week in Spring! This week I'm in Atlanta, GA with a few other SpringSource colleagues talking to developers at the DevNexus Java conference and - tomorrow - speaking at the Atlanta Spring User Group. This show is bigger and better than ever this year! I love the energy and community here.

If you're in Atlanta, GA, drop by the eHire labs (see the link above for the address) tomorrow night for the Spring User Group and we'll talk about REST, Spring MVC, Spring for Android, Spring Mobile, and more! I look forward to seeing you.

As usual, though, we've got a lot to cover, so let's get to it!

  1. The Spring Data release train "Arora" is now avialable, a synchronized, tested release of all Spring Data sub projects - check it out now!
  2. Craig Walls has announced that Spring Social 1.1.0.M2 has been released ! The new release incorporates tighter integration with Spring Security and a slew of new features.
  3. Jeremy Grelle has announced When.js 1.8.0 which is cujojs's lightweight Promises/A implementation.
  4. Gary Russell has announced Spring Integration 3.0.0 M1. There are no major new features in this first milestone, it is mainly refactoring, removing deprecations, etc. Browse the documentation 'what's new' and the release notes for more information.
  5. Register now to talk with Sam Brannan and Rossen Stoyanchev on Feb 21st in the Webinar: Testing Web Applications with Spring 3.2
  6. New replays from SpringOne2012 - talks from the Data and Integration track talks starting to hit YouTube. Check out Gary Russell's Monitoring and Managing Spring Integration Part 2, and Hadoop / Big Data enthusiasts shouldn't miss Costin's talk How to build Big Data Pipelines for Hadoop using OSS.
  7. As a bonus session this week, we've also released Spring Data REST: Easily export JPA entities directly to the web.
  8. Krishna's blog has a nice post on using CAS (single signon using Jasig) with Spring Security.
  9. Sergei Sizov has put together a nice post on using Spring Security and HTTP Basic authentication.
  10. The Lucky Ryan blog has a very nice post introducing HDIV - which can be used to prevent cross site request forgery (CSRF), remove the ability to alter non-editable data (hidden fields, params…) and even has options to limit characters globally across form fields - and explaining how to use HDIV with Spring MVC.
  11. Your remoting layer (the layer that's exposed over the network) might simply surface the domain model objects from your services layer. Often, however, the object sent across the wire is a slightly different version of the data used by the service. Perhaps fields are omitted because they contain too much data. Perhaps extra fields are added to communicate metadata about the service itself. Perhaps you simply want to flatten two different types into a single object for ease-of-transport. Whatever the reason, the common pattern (or anti-pattern) to handling this is a DTO (data transfer object). We had these before with EJBs and DCOM and CORBA. Now we have them with REST. If you find you have to have DTOs, the jtransfo library introduced in this post seems like it might be helpful in reducing the tedious adapters from DTO to domain object. The post explains how to use JTransfo to automatically handle adapting domain objects to DTOs.
  12. The Fahd.blog blog has a nice introduction to Spring Batch's RetryTemplate. This is a very powerful component of Spring Batch that doesn't get enough love, so I am glad to see this post!
  13. The Learn and Shine blog has a nice post introducing how to use Spring MVC to render XSLT views.
  14. The Java Ninja Chronicles By Norris Shelton, Jr blog has a very concise post on how he took the first steps in using Spring's Java configuration style to make short work of loading properties from an exotic source.

Spring Integration 3.0.0 Milestone 1 is Released!

We are pleased to announce that Spring Integration 3.0.0.M1 is now available. There are no major new features in this first milestone, it is mainly refactoring, removing deprecations, etc. Browse the documentation 'what's new' and the release notes for more information.

We are happy to see more community contributors and are continuing our efforts to promote that growing trend, both in the core project and the extensions respository.

More information is available on the project's home page.

Spring Data release train Arora available

I am pleased to announce the first themed release of the Spring Data release train named Arora. Going forward we'll use names of famous computer scientists to label a set of Spring Data modules to make it easier to identify modules being compatible to each other. This mostly refers to the Spring Data Commons version they refer to.

The Arora release contains the following modules:

The major new features of the release are:

  • Annotation based auditing support through @CreatedDate, @CreatedBy etc. (except Spring Data Gemfire)
  • Exposure of Spring Data Mapping information for all modules (to be used by Spring Data REST)
  • Spring Data Mapping information being read from accessor methods as well
  • Automatic registration of JodaTime Converters if present on classpath (Spring Data MongoDB)
  • Major improvements to mapping subsystem and query execution for Spring Data MongoDB
  • Extended querying options on query methods (Spring Data Solr)
  • Annotation support for Gemfire functions (Spring Data Gemfire)
  • A tag has been added to the gfe-data XML namespace for automatic basic client connection and region configuration. (Spring Data Gemfire)
  • Support for Lettuce Redis driver (raising the count of supported driver to 5, Spring Data Redis)
  • Dynamic removal of listener for running MesageListenerContainer (Spring Data Redis)
  • Refined Maven build to ease release process

Alongside the new major versions of the Spring Data Modules we've also published bugfix releases for Spring Data Commons (1.4.1), Spring Data JPA (1.2.1) and Spring Data MongoDB (1.1.2).

Note: The artifactId of the Spring Data Commons module has changed to from spring-data-commons-core to spring-data-commons. So if you're explicitly referring to it from your project, make sure you update the reference accordingly.

The binaries will be present in Maven central shortly if not already in place.

This Week in Spring - Feb 12th, 2013

This Week in Spring

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

  1. Dave Syer is taking his SpringOne2GX talk to an online audience on Feb 14th, 2013 Webinar - When and Why Would I Use OAuth2?
  2. Dream team Sam Brannen (Swiftmind) & Rossen Stoyanchev (SpringSource) join forces on Feb 21st, 2013 for a Webinar: Testing Web Applications with Spring 3.2
  3. New SpringOne2GX 2012 talks released to YouTube in HD! Ten Great Reasons to Virtualize Your Java Apps, and What's New in CloudFoundry.
  4. Our pal Boris Lam is back, this time with two posts on how to use Spring Data MongoDB and JSF together.
  5. The PluralSight blog has a video introduction to Spring MVC interceptors. This video is an excerpt from a full-fledged video course.
  6. Cool demonstration: Spring Insight plugins for Spring Integration and RabbitMQ.
  7. The syntx blog has a nice post on how to add HTTP Basic authentication using Spring Security to Spring MVC-secured resources.
  8. Krishna's Blog has a nice post introducing unit-testing the Spring Security layer with the InMemoryDaoImpl.
  9. You know, I was looking for something like this just the other day! Mark's Blog has a nice post on the workflow of the various objects in servicing an incoming HTTP request in Spring MVC. Is this stuff you could easily figure out by sticking a breakpoint in a controller and just looking at the call stack? Sure. But it's also stuff that's very convenient to reference in a pinch and it's nice to see it all laid out in order with a little bit of narrative.
  10. The Dinesh on Java blog has a nice post on how to setup Spring Security.
  11. The Lucky Ryan blog has a really à propos post on migrating XML-based Spring MVC configuration to the Java and annotation centric alternative.
  12. The Java Code Geeks blog has a very nice post on exception handling when dealing with REST services
  13. Our pal Roger Hughes is back, this time with a nice writeup of a few of the various lifecycle techniques for Spring beans.
  14. The CommonJ blog has a nice post on passing request parameters to Spring MVC from JavaScript. This one is faintly related to Spring MVC, but close enough! :)
 

Newsletter Subscription

Our monthly newsletter is packed full of techniques, tutorials, tips and tricks to get you on your way to Spring nirvana. View Archive


Upcoming Events

Upcoming Training

Syndicate content