SpringMVC能够说的上是当前最优秀的MVC框架,采用了松散耦合可插拔组件结构,比其余MVC框架更具扩展性和灵活性;为了提升框架的扩展性和灵活性,设计了松耦合可插拔的组件。理解SpringMVC的原理,在面试或工做中都十分的重要。git
SpringMVC的原理在网络上处处均可以找获得,可是写的都很归纳、零散;对应阅读源码经验较少的小伙伴来讲,
本身去看源码被不少细节所干扰阻碍,不可以很好的抽离出springMVC原理的主线。github
本身想和小伙伴一块儿从手写简易版的SmartMVC框架出发,理出SpringMVC的主线并深刻理解SpringMVC的原理。框架代码开发加上文档编写大概花费时间一个月面试
SmartMvc ├── docs -- 开发文档 ├── smart-mvc -- 实现mvc功能的核心代码 ├── smartmvc-springboot-autoconfigure -- SmartMvc的自动化配置 ├── smartmvc-springboot-demo -- SmartMvc的demo项目 ├── smartmvc-springboot-starter -- SmartMvc的starter └── spring-mvc-demo -- SpringMVC的demo
5.2.9
你们记得顺手给个star哦spring
全部开发文档都在项目的docs
目录下spring-mvc
<dependency> <groupId>com.silently9527</groupId> <artifactId>smartmvc-springboot-starter</artifactId> <version>1.0.0-SNAPSHOT</version> </dependency>
ApplicationContextClass
@SpringBootApplication public class SmartmvcSpringbootDemoApplication { public static void main(String[] args) { SpringApplication application = new SpringApplication(SmartmvcSpringbootDemoApplication.class); application.setApplicationContextClass(ServletWebServerApplicationContext.class); application.run(args); } }
在开发文档中可能会存在错误或不足之处,欢迎你们指出。springboot
创做不易,但愿朋友们能够点赞评论关注三连网络
原文地址,转载请注明出处:https://silently9527.cn/archives/88架构