Latest in branch 1.0
1.0.1
Released 23 Dec 2005
(20 years ago)
SoftwareSpring Framework
Version1.0
Supported
Java versions
Java 1.3
Initial release1.0
23 Dec 2005
(20 years ago)
Latest release1.0.1
23 Dec 2005
(20 years ago)
End of
OSS support
Unavailable
End of
enterprise support
Unavailable
Spring Framework 1.0 ReleasesView full list

What Is New in Spring Framework 1.0?

Spring Framework 1.0 marks the initial stable release, delivering a comprehensive lightweight container for managing Java object lifecycles and configurations. It fundamentally shifts how enterprise Java applications are built by promoting loose coupling and testability.

Category Key Changes
Core Container Introduction of the BeanFactory and ApplicationContext for Inversion of Control (IoC) and Dependency Injection (DI).
Data Access JDBC abstraction layer with consistent exception hierarchy and simplified transaction management.
Web Framework Spring MVC web framework built on core IoC principles, offering clear separation of controller, model, and view.
AOP Support Integrated Aspect-Oriented Programming support for clean modularization of cross-cutting concerns like logging and transactions.
Integration Support for JMS, mail, scheduling, and remoting, providing a cohesive platform for enterprise integration.

How does the new Inversion of Control container work?

The core innovation is the BeanFactory and ApplicationContext containers. They manage Java objects (beans) and their dependencies, which are defined in XML configuration files. This moves the responsibility of wiring objects from the code itself to the container configuration.

In practice, you define your service and data access objects as beans. The container then instantiates them and injects the dependencies where needed. This matters because it makes your code much more modular, easier to test by swapping implementations, and reduces boilerplate factory code.

What does the new JDBC abstraction layer offer?

It tackles the verbosity and error-proneness of raw JDBC. The JdbcTemplate class handles connection lifecycle, exception translation, and query execution, so you focus on writing SQL and processing results.

Spring converts checked SQLExceptions into a runtime DataAccessException hierarchy. This cleans up your code significantly, as you're not forced to catch and handle database exceptions in every data access method unless you have a specific recovery strategy.

Why is the integrated AOP support a game-changer?

It allows you to add behavior like declarative transactions across multiple objects without cluttering the core business logic. You can apply services to methods based on pointcut expressions.

For example, you can wrap a method with a transaction by configuring it in the XML file, without writing any transaction begin/commit/rollback code in the method itself. This leads to cleaner, more maintainable code where cross-cutting concerns are managed in one central place.

How does Spring MVC differ from Struts?

Spring MVC is built around the same IoC principles as the rest of the framework. Controllers are configured as beans, allowing them to benefit from dependency injection. This makes them plain Java objects (POJOs) that are easier to test compared to Struts Actions, which are often tied to the Servlet API.

The framework provides a highly flexible web layer. It offers multiple view resolution strategies (JSP, Velocity, etc.) and a simple but powerful command controller pattern. The integration with the core container means your web tier can seamlessly use the same service and data access beans as your standalone application layers.

FAQ

Is Spring Framework 1.0 a replacement for J2EE/EJB?
Not a complete replacement, but it offers an alternative for many use cases. It provides declarative transaction management and distributed object support that can replace complex EJB session beans for most applications, while being much lighter and simpler to develop and test.

Do I have to use XML for configuration in Spring 1.0?
Yes, XML is the primary configuration mechanism in this release. Bean definitions, dependencies, and AOP advisors are all configured through XML files. This externalizes configuration from Java code, which is a core tenet of the framework's flexibility.

Can I use Spring 1.0 with other web frameworks like Struts?
Absolutely. A key design goal is non-intrusiveness. You can use the Spring IoC container to manage your business and data access objects, then wire them into Struts Actions or other web framework components. This lets you benefit from dependency injection and declarative services without rewriting your web layer.

How does Spring's transaction management work without JTA?
Spring provides a consistent programming model for transactions that abstracts the underlying resource. For single-database transactions, it can manage connections and commit/rollback using the JDBC or Hibernate APIs. For distributed transactions requiring JTA, it can delegate to a Java EE application server's JTA provider. You configure this declaratively without changing your business code.

Is AspectJ required to use AOP in Spring 1.0?
No. Spring 1.0 includes its own AOP framework that uses runtime proxies (JDK dynamic proxies or CGLIB). This is sufficient for many common needs like declarative transactions. You can use the full AspectJ language for more advanced pointcuts and weaving if needed, but it's optional.

Releases In Branch 1.0

VersionRelease date
1.0.123 Dec 2005
(20 years ago)
1.023 Dec 2005
(20 years ago)
1.0-rc123 Dec 2005
(20 years ago)