<?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-4.3.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd">
<!-- 定义组件扫描器,指定需要扫描的包 扫描@Controller注解-->
<context:component-scan base-package="com.boot_crm.controller"></context:component-scan>
<!-- 加载注解驱动:配置处理器映射器和适配器 -->
<mvc:annotation-driven/>
<!-- 配置静态资源的访问映射,此配置中的文件,被springMVC映射访问,而不被前端控制器拦截 -->
<mvc:resources location="/js/" mapping="/js/**"></mvc:resources>
<mvc:resources location="/css/" mapping="/css/**"></mvc:resources>
<mvc:resources location="/images/" mapping="/images/**"></mvc:resources>
<mvc:resources location="/fonts/" mapping="/fonts/**"></mvc:resources>
<!-- 配置视图解析器 -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<!-- 设置前缀 -->
<property name="prefix" value="/WEB-INF/jsp/"></property>
<!-- 设置后缀 -->
<property name="suffix" value=".jsp"></property>
</bean>
<!-- 配置拦截器 -->
<!-- <mvc:interceptors> -->
<!-- <mvc:interceptor> -->
<!-- <mvc:mapping path="/**"/> -->
<!-- <bean class="com.My.intercepter.LoginInterceptor"/> -->
<!-- </mvc:interceptor> -->
<!-- </mvc:interceptors> -->
</beans>
扫描二维码,在手机上阅读!
评论 (0)