就是跟着视频一步步走的,却出现请求路径不对
开发环境:eclipse
部署环境:tomcat8.0
--------------------------------------------------------------------------------
再贴上spring-servlet.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/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
">
<context:annotation-config></context:annotation-config>
<!-- 开启mvc注解驱动 -->
<mvc:annotation-driven></mvc:annotation-driven>
<!-- 启动包扫描功能 -->
<context:component-scan base-package="com.bao.controller"></context:component-scan>
<context:component-scan base-package="com.bao.service"></context:component-scan>
<mvc:resources location="/assets/" mapping="/assets/**"></mvc:resources>
<mvc:resources location="/bootstrap3.3.5/" mapping="/bootstrap3.3.5/**"></mvc:resources>
<mvc:resources location="/css/" mapping="/css/**"></mvc:resources>
<mvc:resources location="/js/" mapping="/js/**"></mvc:resources>
<!-- <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping"
/> -->
<bean class="com.bao.core.SpringExceptionResolve"></bean>
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />
<bean id="jsonView"
class="org.springframework.web.servlet.view.json.MappingJackson2JsonView" />
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/page/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>
backend_common.jsp从您源代码中拿过来的