Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/leihuazhe/spring-mvc-source

Spring-mvc 源码分析
https://github.com/leihuazhe/spring-mvc-source

Last synced: 16 days ago
JSON representation

Spring-mvc 源码分析

Awesome Lists containing this project

README

        

## 父子容器

`web-mvc`环境下,有父子容器的概念

- 父容器 `WebApplicationContext`

```
Root WebApplicationContext: startup date [Wed Aug 08 12:44:18 CST 2018]; root of context hierarchy
```

- 子容器 NameSpace for DispatcherServlet `WebApplicationContext`
```
WebApplicationContext for namespace 'appServlet-servlet': startup date [Wed Aug 08 12:44:31 CST 2018]; parent: Root WebApplicationContext

```
### web.xml DispatcherServlet 配置
web.xml中对DispatcherServlet的配置,如果不指定其spring.xml地址,默认的地址及文件名为:
`WEB-INF/${servletName}-servlet.xml`.本例中的文件为`appServlet-servlet.xml`

```xml


appServlet
org.springframework.web.servlet.DispatcherServlet

1


appServlet
/


appServlet
*.html

```