SSM框架controller层配置文件

霸气de小男生 提交于 2019-11-27 10:15:34
<?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"       xmlns:mvc="http://www.springframework.org/schema/mvc"       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/mvc/spring-mvc.xsd"><!--controller层-->    <!--扫描controller层  开启注解-->    <context:component-scan base-package="cn.controller"></context:component-scan>    <!--配置视图解析器-->    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">        <property name="prefix" value="/pages/"></property>        <property name="suffix" value=".jsp"></property>    </bean>    <!--注解驱动-->    <mvc:annotation-driven></mvc:annotation-driven>    <!--静态资源放行-->    <mvc:default-servlet-handler></mvc:default-servlet-handler></beans>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!