标签:name scan package one home servlet false lse source
在web.xml中
<welcome-file-list> <welcome-file>index</welcome-file> </welcome-file-list>
在springmvc的配置xml中
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="suffix" value=".jsp"></property> <property name="prefix" value="/WEB-INF/views/"></property> </bean> <context:component-scan base-package="cn.taotao" use-default-filters="false"> <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" /> </context:component-scan> <mvc:view-controller path="/" view-name="home/index"/> //关键代码,把他放到了,view的home文件甲下了
标签:name scan package one home servlet false lse source
原文地址:https://www.cnblogs.com/sdgtxuyong/p/12503542.html