Spring Boot:从入门到测试实战
1. Spring MVC的演进与Spring Boot的崛起
1.1 Spring MVC配置的变迁
早期的Spring MVC开发中,我们常常需要编写大量的XML配置文件。例如下面的 mvc-config.xml
文件:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans
http://www.sprin