Chris Beams

Chris Beams

Alumni
Recent Blog posts by Chris Beams

Spring Framework 3.1 M1 released

Engineering | February 11, 2011 | ...

The first milestone release of Spring 3.1 has just been published [1], and this article kicks off a series of posts where I and other team members will walk through each of the major features. Even in the first milestone there's already a lot to talk about!

  • Bean definition profiles
  • Unified property management through Spring's new Environment abstraction
  • Enhancements to Java-based configuration with @Feature methods
  • Expanded MVC namespace support and a Java-based configuration equivalent
  • Streaming support and new interception model for the RestTemplate API
  • Comprehensive caching support
  • New c: XML namespace for concise configuration of constructor injection

Today I'll be covering the first item -- a new feature we call bean definition profiles. One of our most frequent requests has been to provide a mechanism in the core container that allows for registration of different beans in different environments. The word "environment" can mean different things to different users, but a typical scenario might be registering monitoring infrastructure only when deploying an application into a performance environment, or registering customized implementations of beans for customer A vs. customer B deployments. Perhaps one of the most common cases would be working against a standalone datasource in development vs looking up that same datasource from JNDI when in QA or production. Bean definition profiles represent a general-purpose way to satisfy use cases of this kind, and we'll explore the latter use case in the examples below.

Get hands-on with a sample

I've developed a small sample to accompany this post, and you might like to take a moment now to check it out (if not, don't worry; you don't need the code to read along below). Just follow the instructions on the README at https://github.com/cbeams/spring-3.1-profiles-xml. If you're not familiar with Git, the README has instructions…

Configuration Simplifications in Spring 3.0

Engineering | December 22, 2009 | ...

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. It provides a code-centric way of declaring Spring bean definitions using nothing more than methods and annotations. You might call it Plain Old Configuration* :) This means that for simple situations, no XML will be required!

Let's get started. To demonstrate @Configuration functionality, I've created a very simple project in the new spring-samples SVN repository. You may want to sync up and…

Building Spring 3

Engineering | March 03, 2009 | ...

UPDATE - Feb 21 '12: Spring Framework has moved to GitHub, and for 3.2.x development has moved from Ant to Gradle. Take a look at the building from source section of the README there for (greatly simplified!) instructions.

Introduction

As Juergen announced last week, Spring 3.0 Milestone 2 is now available. In this post, I'll show you in six steps how to download and build the latest Spring 3 sources and get a development environment up and running in Eclipse.

We'll wrap up by discussing the best ways to follow Spring 3 development, how to file bugs and improvement requests, and considerations for…

Spring JavaConfig 1.0.0.M4 Released

Releases | November 07, 2008 | ...

Dear Spring Community,
We are pleased to announce that Spring JavaConfig 1.0.0.M4 is now available.
Download | Reference Docs | API Docs

Major Highlights

  • @AnnotationDrivenTx - support for declarative transaction management
  • @AnnotationDrivenConfig - support for @Autowired, @Resource, et al.
  • @ComponentScan - scan for @Component classes directly from JavaConfig
  • @AspectJAutoProxy - first-class support for @Aspect beans
  • @MBeanExport - first class support for exporting JMX MBeans
  • Complete PetClinic sample now available with distribution demonstrating use of JavaConfig
  • Improved support for externalized values with @ExternalValue and @PropertiesValueSource
  • @ImportXml - bootstrap Spring XML bean definitions from JavaConfig
  • Improved error handling
  • ... and dozens of other resolved issues


Please give this milestone a test drive, and provide your feedback through the Spring JavaConfig Forum or Issue Tracker. For more information, visit the Spring JavaConfig Home.

Chris Beams
Spring JavaConfig Lead

Spring Java Configuration - What's New in M3

Engineering | March 27, 2008 | ...

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 with Spring, the following snippet of XML configuration will likely be familiar. Let's assume we're looking at a file named application-config.xml:


<beans>
	<bean id="orderService" class="com.acme.OrderService"/>
		<constructor-arg ref="orderRepository"/>
	</bean…

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