What's New in Spring 1.1- -
New features and enhancements in Spring 1.1 RC1 include:
- IoC container supports Method Injection: the overriding of concrete or abstract methods, typically to look up a dependency managed by the container. This means even less need to implement Spring-specific interfaces such as BeanFactoryAware.
- The IoC container can now obtain objects from static factory methods as well as constructors. This enhancement allows excellent AspectJ integration: it is now possible to configure AspectJ aspects using Spring Dependency Injection, like any object. We plan to provide examples of AspectJ integration before 1.1 final.
- Support for sending and receiving JMS messages
- Support for Apache OJB as an ORM alternative, within Spring's consistent data access abstraction
- Significantly improved JDO support
- Greater flexibility in translating SQLExceptions, and other JDBC enhancements
- Support for nested transactions and savepoints when working with JDBC. Declarative transaction management can support nested transactions.
- AOP proxies are now serializable if all Advisors and target are serializable
- Improved Velocity and FreeMarker support
- Reworked parent/child bean definition concept: a child can now override any inherited settings. This can be used to simplify configuration.
请注意我加上粗体的地方。Rod Johnson是一个实用至上的程序员,再一次得到验证。“从静态工厂方法获得对象”是一个重要的新特性。遗留代码中有很多工厂和Singleton,Spring 1.1可以更加直接简便地整合它们。这是一个典型的实用至上的tradeoff,虽然Singleton不是一个优雅的设计,但有必要整合它们,而不是做更多的重构。