springmvc.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-4.1.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
">

    <!--开启mvc的注解功能-->
    <mvc:annotation-driven></mvc:annotation-driven>

   <!--开启扫描,将com.blb下面添加注解的类加入IOC容器中--> <context:component-scan base-package="com.blb"></context:component-scan>    <!--设置视图解析器前缀跟后缀--> <bean id="jstlView" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value=""></property> <property name="suffix" value=".jsp"></property> </bean> </beans>

 

posted @ 2020-03-12 16:29  Tsugar  阅读(83)  评论(0编辑  收藏  举报