This Week in Spring

This Week in Spring - May 14, 2013

Welcome to another installment of This Week in Spring! Some rather exciting projects have been announced this week, and if you can believe it, we're almost out of SpringOne 2012 replay content! Good thing the SpringOne 2013 agenda grid is going live very soon, so we'll be able to look ahead. As usual, we've got a lot to cover so let's get to it!

In preparation for the agenda grid going live, a lot of new SpringOne 2013 sessions have been accepted:

  1. Jon Brisbin announced the Reactor project. The Reactor project aims to provide a solid foundation for asynchronous IO-based applications, on top of which it is natural to provide integrations for technologies like Grails and Spring. Reactor already features a good multi-language story with support for Groovy and Java (and, particularly, the upcoming Java 8 release!) Be sure to check this out, especially the comments section if you have questions about how this compares to other asynch technology!
  2. Spring Security lead Rob Winch has been busily enhancing the Spring Security and Spring Security OAuth Java Configuration story. He's got a first cut of the Spring Security OAuth Java Configuration API available, and I'm sure he'd appreciate any feedback on the new DSL, so definitely be sure to check it out! Nice work, Rob!
  3. Webinar on Thursday May 16th with Chris Richardson, author of POJOs in Action, on Decomposing Application for Deployability and Scalabilty. Register Now!
  4. Join Broadleaf Commerce's Andre Azzolini for a Webinar on Tuesday, May 28th as they discuss their Lessons Learned Moving from GWT to SpringMVC.
  5. Paul Chapman introduces some of the diverse support for content negotiation in Spring MVC on the SpringSource blog.
  6. Chris Harris's talk, the Spring Data MongoDB Project, from SpringOne2GX 2012 is now available in HD on YouTube!
  7. Lee Faus's talk, Extreme Makeover - Application Edition, from SpringOne2GX 2012 is now available HD on YouTube!
  8. The JIWHIZ blog, and blogger Yuan Ji, has put together a nice post introducing Spring's Java configuration support.
  9. This post - from blogger Chris Wong in a January post called "JmsTemplate is not evil" - explains some of the subtleties of using Spring's CachingConnectionFactory with a raw ConnectionFactory and then, for extra points, introduces one approach to dramatically speeding up ActiveMQ, in particular.
  10. The HMKcode blog has a nice, exhaustive post introducing how to use the jQuery-file-upload plugin with Spring MVC.
  11. Have you taken a look at HATEOAS yet? HATEOAS is a design pattern, an approach, for building better RESTful web services. Spring HATEOAS makes doing so dead simple atop Spring MVC, and this blog by Geraint Jones introduces Spring HATEAOS very nicely
  12. Blogger Alexey Zvolinskiy answers a common question: how do I bind checkboxes to the model object that's sent back and forth to the server in Spring MVC?
  13. Our friend @baeldung maintains a daily Twitter feed of awesome posts about Spring on StackOverflow, and I think he's dug up some absolutely amazing content. One post answers a question I am frequently asked: how do I enumerate all the Spring MVC @Controller-annotated beans at runtime?
  14. Another great post that I found while trawling through the @SpringAtSO handle was this post, explaining how to propagate request-scoped attributes beyond the thread of the current request. This post applies generally to any situation where a request-scoped attribute needs to propagate beyond its original thread and request.

This Week in Spring - 7 May, 2013

Welcome to An Epic Week in Spring! Lots of new sessions have been posted to SpringOne Conference, so head over to the site and check out the featured sessions! We'll have the agenda grid online before the end of May.

Featured SpringOne2GX 2013 sessions accepted!

Many other new sessions accepted as well:

And now, back to our regularly scheduled week in Spring... as usual, we've got a lot to cover, so let's get to it!

  1. Juergen Hoeller and Marius Bogoevici's talk, Java EE services for Spring applications, from SpringOne2GX 2012 is now available in HD on YouTube!
  2. John Davies's talk, Spring Integration in the Wild, from SpringOne2GX 2012 is now available HD on YouTube!
  3. Kim Saabye Pedersen has written a small example on using @Transactional on an interface with Spring's transaction management infrastructure. Nice job, Kim!
  4. Would it be possible to take Spring Petclinic as it is now and scale it up to 1000 requests per second on a single server instance? Julien Dubois from Ippon Technologies has written a great series of five blog entries on that topic. If you missed them from the previous roundups, check out the whole series, starting here!
  5. Petri Kainulainen has written a great post introducing how to sort data using Spring Data SOLR.
  6. By the by, I know I've mentioned this before, but it really is handy. Have you checked out Alvaro Videla's RabbitMQ simulator?
  7. Spring Data ninja Oliver Gierke has written a great response to the question, How do I use Spring Data MongoDB in a multi-tenant fashion? Be sure to check it out. Generally, his advice is applicable to many such scenarios.
  8. Serkan ÖZAL has put together an awesome, bytecode-based RowMapper that can be used with Spring's JDBC infrastructure (like JdbcTemplate) and that can handle relationships like an ORM might. Because it's bytecode-based, it's very fast and not given to the same reflection-based performance limitations of Spring's own BeanPropertyRowMapper. I haven't tried this out yet, but it looks very promising!
  9. Our friend Roger Hughes is back with a tutorial (of two posts, thus far). The first, RESTful Ajax with Spring MVC, establishes an application (without REST and Ajax) and the second then introduces serializing data objects using Jackson, a JSON serializer.
  10. Bharat Sharma also wrote a nice post on serializing to JSON with Spring MVC this week!
  11. Blogger Kal wrote up a nice post on how Spring MVC simplifies file-uploads with Spring MVC and commons-fileupload.

This Week In Spring - April 30th, 2013

Welcome to another installment of This Week in Spring! We've got a lot to cover this week, as usual, so let's get to it. Did you miss last week's Pivotal public launch? Catch the replay and learn about GE's investment in the new entity! Pivotal's mission is about bringing consumer-grade software to the enterprise -- where open source technology like Spring, Groovy, Grails, RabbitMQ, Redis, and Cloud Foundry, are already widely adopted. Check out the new Pivotal website, under the Community link (top right) for some other open source initiatives that might surprise you!

  1. Oliver Gierke has announced Spring HATEOAS 0.5, which contains lots of new features!
  2. Spring Security lead Rob Winch has announced that Spring Security 3.1.4 is now available. This is a maintenance release with a number of bug fixes including OSGi support for Spring 3.2.
  3. Spring Data ninja Oliver Gierke also (boy that guy gets around!) tweeted a look at the Spring Data roadmap: introducing Spring Data "Babbage."
  4. Spring Data Arora SR1 released this week (named for Sanjeev Arora). As an aside, you have probably noticed that the names of the various Spring Data release trains are adapted from various influential names in computer science. The new release is named for Charles Babbage.
  5. Adam Shook and Dr. Mark Pollack's webinar, Hadoop, Pivotal HD and Spring for Apache Hadoop, is now available online.
  6. Gil Tene, of Azul Systems, gave an amazing talk at SpringOne2GX 2012 called Understanding Java Garbage Collection and what you can do about it, which is now online.
  7. New SpringOne2GX replays now available in HD on YouTube: Building for Performance with Spring Integration & Spring Batch, Case Study: Provisioning a Multi-Site In-Memory Database
  8. James Watters shared a video he'd discovered on setting up Cloud Foundry and BOSH. It's pretty epic and worth a watch if you want to get a handle on BOSH.
  9. What people write blog posts about sometimes surprises me. The Javarevisted blog has a nice post introducing Spring's (fairly internal, albeit stable) org.springframework.util.StringUtils class, with examples on how to convert collections to delimited strings. I think this is perhaps too much information on the subject, but I love the enthusiasm!
  10. RabbitMQ developer-advocate Alvaro Videla has put together a post on how to unit-test RabbitMQ from PHPUnit. This approach is pretty cool, though I wonder how well it would play in Java and jUnit with concurrent test suite execution. Either way, this is a nice way to unit test my favorite message queue!
  11. Do you need a Spring Integration adapter? Have you checked out the Spring Integration extensions repository? This repository simply collects adapters that move faster than the Spring Integration core, or that are still being polished. It's a great place to find solutions to various problems. Heck, even the pull requests are chock full of useful stuff - I see an MQTT adapter in there by the amazing Gary Russell!
  12. Check out this amazing post on @gopivotal blog called 800,000 Messages/Minute: How Nokia’s HERE Uses #RabbitMQ to Make Real-time Traffic Maps over on the @gopivotal blog. It introduces the Nokia HERE architecture that builds on Spring AMQP and RabbitMQ.

This Week in Spring - April 23rd, 2013

Welcome back to another installment of This Week in Spring! Here in San Francisco, we're experiencing the first fits of life and beautiful weather typical of spring time. Fitting, too, as things are busy-as-can-be in the Pivotal open source communities - including Cloud Foundry and SpringSource - as we march towards the Pivotal Initiative launch on April 24th. See you then!

Without further ado, let's get into this week's roundup:

  1. Have you guys seen the amazing Java configuration support in Spring Batch 2.2.0.RC1? The code I've just linked you to demonstrates a complete working Spring Batch job that reads in a .csv file and then writes the records to a data source, all of which are configured in the class, entirely in Java. This demonstrates the @EnableBatchProcessing annotation in 2.2.0. Check it out!
  2. New SpringOne2GX replays now available in HD on YouTube: Implementing Domain Driven Design with Spring and vFabric, Batch Processing and Integration on Cloud Foundry and a bonus session, Understanding Java Garbage Collection and what you can do about it.
  3. The FuzzyDB open source project tweeted that they'd released a new version of FuzzyDB with Spring Data bindings aligned with the Spring Data Arora release train. Congratulations, guys!
  4. Have you had a chance to play with Thymeleaf, the HTML5 and Spring MVC-friendly templating engine? If you'd like to learn even more, you'll probably like this presentation called Thymeleaf, Will it Blend?
  5. David Welch put together a quick demo of Spring Data Mongo and made the work available. He tweets that he went from working demo in 8 minutes with 4 classes and a pom.xml. Nice work man!
  6. Check out Ramnivas Laddad's awesome talk CloudFoundry Architecture talk at SpringOne2GX up live on the SpringSource YouTube channel SpringSourceDev.
  7. Spring HATEOAS lead Oliver Gierke tweeted a link to this post, "How I Explained REST to my wife", which would seem at first to be just one person's attempt at explaining a fairly deep technology concept to a person who didn't have the same technical background, but quickly turns into a (I think really insightful) look at the applicability of REST. Check out Spring HATEOAS if you want to take your REST-fu to the next level.
  8. I'm personally enamored of the new Java configuration APIs, both those recently released and those currently available in preview releases. I showed a very simple example of the Spring Batch API above. I also took a moment last week to write about the powerful Spring Social Java configuration API soon to be available in the 1.1.0.M2 release.
  9. You can have Spring perform a sort of pre-condition check by using the @Required annotation to insist at runtime that a property be satisfied with a non-null value, or Spring will abort the construction of the object. This helps avoid any silent NullPointerExceptions. This JavaBeat post does a nice job explaining how to use @Required.
  10. The how to do in java blog has a nice posting on how to create a custom UserDetailsService in Spring Security 3.
  11. The JavaCodeGeeks blog has a nice post on how to create RESTful services with Spring MVC.
  12. Brian's Java Blog has a nice post on using Spring AOP with both annotation and XML-centric configuration options.

This Week in Spring - April 16th, 2013

Welcome to another installment of This Week in Spring! It's been an exciting week for Spring at Pivotal, which you can hear more about at the re-scheduled Pivotal launch event on April 24th.

  1. In case you are reading too fast, Pivotal has re-scheduled the launch event to April 24th. Register here!
  2. Arjen Poutsma has announced Spring Web Services 2.1.3.RELEASE. The new release mainly consists of bug fixes, for the full details check out the changelog.
  3. Don't miss the upcoming Webinar with Donald Miner and Mark Pollack discussing Pivotal HD and Spring Hadoop, a good introductory webinar for those that are Pivotal HD-curious.
  4. New SpringOne2GX replays now available in HD on YouTube: Cloud Foundry Architecture, Effective Design Patterns in NewSQL
  5. There was a great post on Reddit the other day that explains the difference between REST and SOAP in terms of Martin Lawrence. This has nothing to do with Spring, but was droll enough that it's worth sharing. Spring, of course, has an amazing REST stack and I highly encourage people to check out how to build consolidated, streamlined REST services with Spring! Moving on... :)
  6. James Rossiter has a good post on how to use a Spring InitBinder to Resolve Type Mismatch and bind Exceptions in POST from Spring MVC to Controller Actions.
  7. @olivergierke brings up a great point on Twitter: how much code does it take to add the JTA 1.2 JSR javax.transaction.Transactional annotation to Spring? Almost nothing! Most of the code here is just unit tests. Otherwise, this is just a dead simple mapping of the JTA annotation to Spring's already supported engine, which also currently supports the native Spring @Transactional and @javax.ejb.TransactionAttribute annotation.
  8. Are you looking into Gradle and want to get started with Spring, quickly? Giancarlo Frison has put together a nice post with a bootstrap Gradle build that can be used with Spring applications.
  9. Eugen Paraschiv has put together a nice post on how to use RestTemplate to do HTTP BASIC authentication.
  10. Spring has long supported a utility class, called the org.springframework.util.StopWatch, which can be used to measure the execution of method invocations. The Javarevisited blog has a nice post on how to use the StopWatch class.
  11. This post is fairly old, but I just stumbled upon it and thought it was a well thought out presentation introducing Aspect Oriented Programming (AOP) in Spring.

This Week in Spring - April 9th, 2013

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. SpringSource CTO Adrian Colyer outlines the direction and momentum of SpringSource and the Spring projects under the Pivotal Initiative, a new company spun out of EMC comprised of - among other things - SpringSource, Cloud Foundry, and GreenPlum. This is definitely worth a read if you want to understand Spring's - ahem - Pivotal role in this new initiative!
  2. Spring Batch lead Michael Minella has announced that Spring Batch 2.2.0.RC1 is now available. The new release includes preliminary support for Spring Data, Java configuration support, non-identifying job parameters and numerous fixes and polishes. This release is amazing, and definitely worth a look. I, personally, love the Java configuration API that's been surfaced. You don't need to write another Spring Batch XML file if you don't want to!
  3. Spring Mobile lead Roy Clarkson has announced that Spring Mobile 1.1.0.M3 has been released featuring simpler configuration when using a custom domain strategy with SiteSwitcherHandlerInterceptor, support for Kindle Fire device detection (as tablet or mobile depending on which mode they are in), several resolved issues and compatibility with Spring Framework 3.2.2.
  4. New SpringOne2GX replays now available in HD on YouTube: Virtualizing and Tuning Large Scale Java Applications, From Spring and Java to Spring and Akka
  5. The HMK blog has a really nice post on how to use the Cujo.js's rest.js and Spring MVC. Very cool!
  6. The JavaRevisited blog has put together a post on calling stored procedures from Spring using the StoredProcedure template object. There are other ways to approach this same problem, including the SimpleJdbcCall object and simply using the update(String, Object ... params) method on JdbcTemplate. Check it out!
  7. The Spring Java Tutorial blog has a nice post on using stored procedures with Spring, and it also uses the same domain example - an EmployeeDAO. They aren't exacty the same - far from it - but it does seem like one heckuva coincadence! At any rate, more information's always good.
  8. Spring provides various lifecycle callback methods, which this JavaBeat blog looks at.
  9. The Binary Beans blog has a post that simply links to some interesting, introductory videos that we've published on the SpringSourceDev YouTube Channel. If you're a regular reader of this round up then you've seen these videos before. But, it's a good 3 hours of introductory content and worth a look if you want a good getting started experience.
  10. KH Yiu has put together a cool post introducing the concept of a factory pattern (which you're no doubt already familiar with!) in application code, built with Spring. This is not about how Spring uses the factory pattern, and was kind of an interesting approach. Nicely done!
  11. Daniel Wong put together a really cool blog illustrating how to tie together Spring MVC with OpenCMS! Definitely worth a look.
  12. The 11th Hour blog put together a nice post on how to use the Spring Expression Language with some examples.
  13. Wang Xiang's put together a blog.. more like a series of snippets.. demonstrating how to setup Jetty, a DataSource, and Spring together.
  14. The Java Code Geeks blog has an introductory post on using Spring MVC with JSR 303 bean validation. Check it out!
  15. Our pal Mark Serrano is back, this time with a review of Spring Security lead Rob Winch's book on Spring Security.
  16. Hippoom Zhou has put together a nice post introducing how to use mocks and stubs in Spring Integration tests. This is a very nice post, and definitely worth a look!
  17. The awesomely named Raging Goblin blog has a nice post on how to do role-based views using Spring Roo and Spring Security.
  18. Peter Chng describes a scheme that can be used to auto-register custom converters used for data type conversion in core Spring, Spring MVC, and Spring Integration, among other places. Pretty smart!

This Week in Spring - April 2nd, 2013

This Week in Spring

Welcome to another installment of This Week in Spring ! I've just returned from Devoxx UK and Devoxx France where I was very happy to talk to developers using Spring from all walks of industry. I also spoke at Skills Matter in London on building web applications using Spring. Thanks to Skills Matter, the London Spring User Group, and to the amazing Rob Harrop for having me, it was such a pleasure! The video from that session is available online if you're interested.

  1. Register today for the Super Early Bird rate at SpringOne 2GX 2013, in Santa Clara, CA Sept 9th-12th, 2013!
  2. Gary Russell's announced that Spring AMQP 1.2.0.M1 is now available.
  3. The Cujojs team has announced that rest.js is now part of Cujo.js and rest.js 0.9 and is now available.
  4. Gary Russell's announced that Spring Integration 2.2.3 is now available. This release corrects an issue with the conversion of some complex message payloads when being mapped to method arguments, as well as a few other minor issues.
  5. Arjen Poutsma has announced that Spring Scala 1.0.0.M2 is now available. The new release is full of features, including an updated JdbcTemplate wrapper, rich wrappers for BeanFactory, ListableBeanFactory and ApplicationContext, AOP advice wrappers with implicit conversions, support for Spring 3.2.2, and updated support in FunctionConfiguration for eager initialization, along with many other bug fixes and changes.
  6. Last week's webinar introducing the Spring Integration adapter for Splunk is now available online. Nice job by David Turanski and Damien Dallimore (Splunk)!
  7. New SpringOne2GX replays now available in HD on YouTube: Getting Started with Spring Security 3.1, Tooling for Spring, Grails and the Cloud
  8. The JRebel guys have announced an updated version of their plugin which facilitates live-reloading of code in Java applications. The new release features improved support for Spring, supporting live reloading of @Configuration-based Spring applications.
  9. James Rossiter has a nice post on how to handle form binding using Spring MVC's <form> tags and Spring MVC models. There are two posts. The first introduces how to bind a parent and child object. The second introduces the initBinder mechanism.
  10. The JavaBeat blog has a nice post on how to use Spring's scopes
  11. Pravin Chavan has a nice post on how to handle HTTP request interception using the Spring framework.
  12. The 2Bloggers blog has a nice post introducing the distinct duties performed by the BeanFactory and ApplicationContext objects in Spring and their relationship to each other.
  13. The TechRecipes blog has a nice post on basic configuration of a Spring application using Spring's XML configuration format. This is admittedly very introductory.
  14. The Java EE Architectures blog has a nice post on how use Spring MVC and Spring Data MongoDB together.
  15. Camilo Lopes has written up a book review (in Portuguese) of the Portguese-language book Vire o jogo com Spring Framework. This is worth a read if you're looking for a book introducing Spring (in Portuguese).
  16. The Programming Fortune blog has put together a nice post that's also on the subject of populating objects with form-field data.

This Week in Spring - March 26, 2013

Welcome to another installment of This Week in Spring! This week I'm in chilly (brrr!) London, England and Paris, France, for Devoxx UK and Devoxx FR and - tonight - I gave a talk at Skills Matter for the London Spring User Group. What a pleasant experience. If you're in France and want to talk Spring, don't hesitate to ping me.

  1. The CujoJS team has announced that When.js 2.0 is now available.
  2. I found a few nice posts introducing Spring Integration. Here's part 1 and part 2. These posts are very thorough and well worth a read!
  3. New SpringOne2GX replays now available in HD on YouTube: What's New in Spring Integration 2.2 and Spring Integration, Batch, & Data Lightning Talks.
  4. Did you guys miss SpringOne2GX 2012? Don't fret, Oleg Zhurakousky and Arjen Poutsma's talk introducing how to use Spring with Scala is now available on InfoQ.
  5. Michael Isvy's been hard at work refactoring the code of the canonical Spring PetClinic reference application. The application is now available on GitHub.
  6. Long time readers will remember Daniel Fernandez, author of the amazing Thymeleaf templating engine that works well with Spring MVC and Spring Security. We're happy to have him pen a blog post on how Thymeleaf contributes to the refactored Spring Travel application as the view engine.
  7. Have you guys checked out the RabbitMQ simulator on Cloud Foundry?
  8. Speaking of RabbitMQ there are now Lua bindings available.
  9. Alexey Zvolinskiy has a very introductory post on Spring MVC. Nicely done!
  10. Our friend Roger Hughes is back at it again, this time with a post on how to create a Spring MVC 3.2 web application.
  11. The ITEye blog has a nice Chinese-language post on how to use Spring and MyBatis together.

This Week in Spring - March 12th, 2013

Welcome to another installment of This Week in Spring! This week, there's a lot of Spring Tool Suite news, so be sure to check out the new release and try it out. One last reminder: be sure to join me Thursday for a webinar introducing Spring's REST and mobile support at 3:00PM GMT (for Europeans) and 10:00AM PST (for North America). If you've wanted to learn how to build mobile applications for your Spring-based backend services, then this talk is for you. We'll look at Spring's rich support for REST, Android and mobile platforms, in general.

  1. Jonathan Brisbin's announced that Spring Data REST 1.1.0.M1 has been released. The new release is basically a from-the-ground up rewrite. In the new release, there is support for all repositories including MongoDB and GemFire-based repositories.
  2. Martin Lippert has announced that Spring Tool Suite and Groovy/Grails Tool Suite 3.2.0 have been released. The new version is much faster than the previous version, and includes updated support for Eclipse Juno SR2, high-res displays on OSX, and updated compliance with various Spring projects, including Spring Integration 2.2.
  3. Rob Winch has announced that Spring Security SAML 1.0.0.RC2 has Been Released. Spring Security SAML is a third-party contribution that provides SAML support for Spring Security.
  4. Spring Integration 2.2.2 is Now Available! The new release features various important bug fixes.
  5. 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!
  6. Join Damien Dallimore and David Turanski on a webinar as they introduce the Webinar: Extending Spring Integration for Splunk - March 28th, 2013
  7. New SpringOne2GX replays now available in HD on YouTube: Addressing Messaging Challenges Using Open Technologies, Introduction to Spring Integration and Spring Batch
  8. @SpringSource is launching a (quick) swag-giveaway campaign!
  9. Spring and Groovy/Grails Tool Suite lead Martin Lippert's put together a video comparing the speed of the Tool Suites at 3.1, versus their speed at 3.2.
  10. Speaking of Spring Tool Suite, are you interested in saving 15% on SpringSource Tool Suite Training?
  11. Yuan Ji has a nice post on how to persist Spring Social connections with Spring Data MongoDB. Awesome! I was about to roll up my sleeves and write such an implementation myself! But this should save me some work. Thanks, Yuan!
  12. The Object Partners Inc. blog has a video up that introduces Spring Batch 2 and how to integrate it with Grails. That's pretty cool! They use a Groovy DSL instead of Spring Batch's native XML format to reduce verbosity. One new alternative is the Java configuration support in Spring Batch 2.2.
  13. Petri Kainulainen has a blog post up that introduces Spring Data SOLR query methods.
  14. The Ippon Technologies blog has a nice post on performance tuning the Spring Petclinic sample application.
  15. Michael Simons has a nice post on using the popular, component-oriented web framework Vaadin with Spring
  16. Nicolas Frankel has a nice post on replacing Spring XML with Java Configuration.
  17. Tomasz Nurkiewicz is back, this time with a post on using the DeferredResult with Spring MVC 3.2's asynchronous request controllers.
  18. Xavier Padró has put together a very nice post on the effect of registering various HttpMessageConverter instances on the RestTemplate when handling different types of RESTful resources.
  19. Before the RestTemplate and REST, and before document-oriented SOAP-based web services and Spring Web Services, there was Spring's JaxWsPortProxyFactoryBean, which can give you a strongly typed client to talk to SOAP web service with a JAX-WS port, or client. This post introduces how to use Spring's JAX-WS support to create a client.
  20. The Spring Addon blog has a perhaps overly-brief look at how to setup a Spring MVC-based REST endpoint. He makes a good point though: if you've got a Spring MVC application, then exposing a RESTful service is dead simple from there.
  21. The Kamal's blog has a nice post on how to setup a Spring MVC 3.0-based application. NB that, with more recent releases of Spring, you don't need any XML for web.xml or the Spring application context.
  22. The fuzzydb in focus has a nice post on how to support both existing Hibernate-based services, as well as JPA-based repositories based on Spring Data JPA, which requires a EntityManager reference. The approach is simple, and something that's uniquely easy to do with Spring's Java configuration style.

 

 

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.
 

 

Syndicate content