2.1SpringMVC的执行流程
2.2SpringMVC注解解析
@RequestMapping
2.3SpringMVC组件扫描
<?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: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 "> <!--controller组件扫描1,2--> <!--<context:component-scan base-package="com.hzw.controller"/>--> <context:component-scan base-package="com.hzw"> <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"></context:include-filter> </context:component-scan> </beans>
2.4SpringMVC的XML配置
<!--内部资源解析器--> <bean id="viewResource" class="org.springframework.web.servlet.view.InternalResourceView"> <property name="prefix" value="/jsp/"></property> <property name="stuffix" value=".jsp"></property> </bean>
3.5知识要点