报错原因:在spring-mvc.xml的配置文件缺少一些配置,正确的配置:
ps:一般这种报错原因都是因为配置文件中有误,像
org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 72; SchemaLocation: schemaLocation 值 ‘http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/beans/spring-beans.xsd’ 必须具有偶数个 URI。
这样的报错信息也是因为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/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/spring-mvc.xsd">