Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 源码分析
- Host: GitHub
- URL: https://github.com/leihuazhe/spring-mvc-source
- Owner: leihuazhe
- Created: 2018-08-08T04:38:43.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-22T06:10:57.000Z (over 1 year ago)
- Last Synced: 2024-10-03T10:47:05.620Z (about 1 month ago)
- Language: Java
- Size: 90.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
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
```