O'Reilly logo

Beginning Spring Framework 2 by Christian Dupuis, Naveen Balani, Thomas Van de Velde, Anne Horton, Sing Li, Bruce Snyder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Rapid Spring Development with Spring IDE

There is no doubt that the Spring framework offers a lot of very useful and powerful features for Java development. These features should be leveraged in as noninvasive a way as possible: application code is not required to have any dependency on Spring APIs. All configuration of application and infrastructure components as well as their collaboration is done using one or several Spring bean definition files. Using Spring's external configuration files enables you to separate configuration concerns from application code.

Spring bean definitions are XML files, based on DTD or XML schemas. You have already learned about the format and syntax of Spring bean definition files in the previous chapters, and you have seen that writing these definition files is very straightforward from the beginning on. It requires only a moderate amount of XML writing and some knowledge of Spring's infrastructure XML elements and components.

But as your application grows the configuration will get more complex — most of all if you don't break your bean definitions into different logical files depending on application layering. The bean definition will get hard to read, maintain, and test. More importantly, editing complex Spring configuration files could be an error-prone operation. For example, writing fully qualified Java class names or editing Spring bean references can result in mistakes that are not discovered until the execution of unit or integration ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required