employeeManager-master/target/classes/applicationContext-SpringMvc.xml

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:p="http://www.springframework.org/schema/p"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-4.0.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">

    <!--只扫描Controller包下的bean-->
    <context:component-scan base-package="com.suny.controller"/>

    <!--开启注释-->
    <mvc:annotation-driven/>

    <!--开启静态资源过滤-->
    <mvc:default-servlet-handler/>
    <mvc:interceptors>
        <mvc:interceptor>
            <mvc:mapping path="/**"/>   <!-- 配置要拦截的链接-->
            <mvc:exclude-mapping path="/css/**"/>   <!--放行登陆页-->
            <mvc:exclude-mapping path="/common/**"/>   <!--放行登陆页-->
            <mvc:exclude-mapping path="/script/**"/>   <!--放行登陆页-->
            <mvc:exclude-mapping path="/fonts/**"/>   <!--放行登陆页-->
            <mvc:exclude-mapping path="/images/**"/>   <!--放行登陆页-->
            <mvc:exclude-mapping path="/login"/>   <!--放行登陆页-->
            <mvc:exclude-mapping path="/index"/>   <!--放行登陆页-->
            <mvc:exclude-mapping path="/login.action"/>   <!--放行登陆请求-->
            <mvc:exclude-mapping path="/checkLogin.action"/>   <!--放行ajax验证用户名-->
            <mvc:exclude-mapping path="/code/**"/>   <!--放行ajax验证用户名-->
            <bean class="com.suny.interceptor.UserInterceptor"/>
        </mvc:interceptor>
    </mvc:interceptors>

    <!--配置springmvc的视图解析地址-->
    <bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
        <property name="prefix" value="/WEB-INF/"/>
        <property name="suffix" value=".jsp"/>
    </bean>


    <!--文件上传限制-->

    <!--defaultEncoding="UTF-8" 是请求的编码格式,默认为iso-8859-1
    maxUploadSize="5400000" 是上传文件的大小,单位为字节
    uploadTempDir="fileUpload/temp" 为上传文件的临时路径
    -->
    <!--<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"-->
          <!--p:defaultEncoding="UTF-8"-->
          <!--p:maxUploadSize="5400000"-->
          <!--p:uploadTempDir="/upload">-->
    <!--</bean>-->

    <!--返回JSON配置-->
    <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
        <property name="messageConverters">

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。