No Need for an Application Server or Web Container
A common misconception about Spring is that it's a framework purely for building web applications. In other words, many people feel that Spring is used for creating applications hosted on Tomcat or on an application server such as BEA WebLogic or IBM WebSphere. It's a shame that this is such a common mistake. The Spring Framework is basically for creating applications that are based on POJOs. In other words, you can use Spring to auto-wire your objects and weave the other required infrastructure into your application.
So, whether you want a simple command-line application or a clustered web application, you can use Spring to create both.