Spring framework structure
The first JAR in Spring is spring-core, but it doesn't do anything special from programmer's point of view. The first really important JAR is spring-beans (which also uses spring-core). And one of most important classes in spring-beans is XMLBeanFactory - using it you bootstrap Spring in any, even a small desktop application. On this JAR depend other, more complex: spring-context, spring-web, etc...
You can always see what depends on what with Maven, and if you don't have Maven, you can use eg mvnrepository.com: http://mvnrepository.com/artifact/org.springframework/spring-beans/3.0.5.RELEASE
Assuming that you are talking about a Springified webapp, its /WEB-INF/web.xml
file will typically contain servlet declarations like this:
<servlet>
<servlet-name>example</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
The DispatcherServlet
will cause the framework to initialize, triggered (I think) by the servlet initialization event.
There are other ways too ...
精彩评论