zoukankan      html  css  js  c++  java
  • spring mvc.xml配置文件

    <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" xmlns:aop="http://www.springframework.org/schema/aop"
    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 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
    <!--扫描控制包-->
    <context:component-scan base-package="ssm.shiro.controller"></context:component-scan>
    <!--声明以注解的方式配置spring mvc-->
    <mvc:annotation-driven></mvc:annotation-driven>

    <!--restful风格:会默认的在web.xml中配置一个名叫default的servlet,这个servlet用来处理所有的静态资源,目前只能处理css资源,
    js可以单独配置-->
    <!--<mvc:default-servlet-handler></mvc:default-servlet-handler>-->

    <!--配置spring mvc的内置的视图解析器-->
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <!--配置视图的前缀-->
    <property name="prefix" value="/WEB-INF/jsp/"></property>
    <!--配置视图的后缀-->
    <property name="suffix" value=".jsp"></property>
    </bean>
    <!--开启aop-->
    <aop:config proxy-target-class="true"></aop:config>
    <!--声明以注解的方式授权-->
    <bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
    <property name="securityManager" ref="securityManager"></property>
    </bean>
    <!--配置统一的异常处理器-->
    <bean id="exceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
    <!--配置出异常后跳转的界面-->
    <property name="defaultErrorView" value="error"></property>
    </bean>
    </beans>

  • 相关阅读:
    IDA Supported Processors
    Hex-Rays Decompiler
    USB ISP(ICSP) Open Programmer < PWM ADC HV PID >
    A SCSI command code -- SIMPLIFIED DIRECT-ACCESS DEVICE (RBC)
    How to match between physical usb device and its drive letter?
    记录一下公司数据库升级的步骤
    Windows2003 SQL2005解决系统Administrator密码不知道的问题
    在SSMS里批量删除表、存储过程等各种对象
    用SQLSERVER里的bcp命令或者bulkinsert命令也可以把dat文件导入数据表
    分享一张SQLSERVER执行流程的图片
  • 原文地址:https://www.cnblogs.com/yinziqiang0909/p/11206004.html
Copyright © 2011-2022 走看看