
Configuration Simplifications in Spring 3.0
Second in a series of posts on "Spring 3 Simplifications" started yesterday by Keith, I'd like to provide a very brief and hands-on introduction to Spring's new @Configuration annotation and related support. As those that followed the Spring JavaConfig project will know, a @Configuration-annotated class serves much the same role as a Spring XML file. Read more…

Logging Dependencies in Spring
This article deals with the choices that Spring makes and the options that developers have for logging in applications built with Spring. This is timed to coincide with the imminent release of Spring 3.0 not because we have changed anything much (although we are being more careful with dependency metadata now), but so that you Read more…

Drawing Spring into the Blueprint
Last month, almost 4 years after the initial 4.0 release, OSGi Alliance officially approved the OSGi service platform 4.2 release. The announcement headline featured the Blueprint Container Service, a new addition to the Compendium specification based on the programming model promoted by the Spring Dynamic Modules (also known as Spring OSGi) project. To quickly summarize Read more…

The Common Service Locator library
The CommonServiceLocator project was released this week on CodePlex with the general idea of providing an IoC container agnostic API for resolving dependencies using Service Location. Erich Eichinger from SpringSource contributed the Spring.NET implementation, thanks Erich! Here is the API so you get the basic idea public interface IServiceLocator : System.IServiceProvider { object GetInstance(Type serviceType); Read more…

Spring Java Configuration – What's New in M3
Today marks the third milestone release of the Spring Java Configuration project (JavaConfig for short). The release contains numerous bug fixes and new features – I'll highlight a few of the most interesting changes below, but first let me give a quick refresher as to what JavaConfig is all about. If you have any experience Read more…

Spring Dependency Injection & Java 5 (including slides and code)
I'm writing this as I'm on my way to Cairo. We're flying just West of Italy and I have clear view on the Italian coast line, with its blue waters and waves gently moving towards shore. It must be nice down there now. I'm heading to Cairo for a meeting of the Egyptian User Group, Read more…

Spring 2.5's Comprehensive Annotation Support
One of the central themes behind Spring 2.5 is comprehensive annotation-based configuration. We've been talking and blogging a lot about @Autowired, about Spring MVC's @RequestMapping and also about the new support for annotated tests written with JUnit4 or TestNG. @Autowired is certainly the central one of Spring 2.5's annotations, being available for use in service Read more…

Spring Java Configuration Moving Ahead
Several users have asked whether we are committed to Spring Java Configuration, and how it sits with the annotation configuration option introduced in Spring 2.5. The answer is yes, we are committed to Java Config; and these two approaches are not mutually exclusive. These two configuration approaches are quite different: the @Autowired annotation in the Read more…

Setter injection versus constructor injection and the use of @Required
A couple of month ago, we start publishing polls on www.springframework.org asking people to provide their feedback about Spring, some of its features and how they are using those features. The first question I posted was whether or not people were checking required dependencies and if so, what mechanisms they used. I quickly followed up Read more…

Code samples from SpringOne 'Beyond the obvious' talk
Last week at SpringOne, Alef and I gave a talk on dealing with complex applications using Spring. Complexity in this case was considered both at the structural and dynamic level. As for the structural part of the talk, I covered that one in my previous blog posting. The dynamic part explained some possible solutions to Read more…

