配置系列:ssm中simple-sso-servlet.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:p="http://www.springframework.org/schema/p"

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

http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">

<!--springmvc驱动扫描包  -->

<mvc:annotation-driven >

<mvc:message-converters>

<!-- 定义文本转化器 -->

<bean class="org.springframework.http.converter.StringHttpMessageConverter">

<constructor-arg index="0" value="UTF-8"/>

</bean>

<bean class="com.wupao.common.spring.exetend.converter.json.CallbackMappingJackson2HttpMessageConverter">

<!-- 指定请求中的回调函数的参数名 -->

<property name="callbackName" value="callback"/>

</bean>

</mvc:message-converters>

</mvc:annotation-driven>

<!-- 处理静态页面被“/”拦截的问题-->

<mvc:default-servlet-handler/>

<!--定义Controller扫描包-->

<context:component-scan base-package="com.simple.sso.controller"/>

</beans>

时间: 2024-08-25 07:28:50

配置系列:ssm中simple-sso-servlet.xml的简单配置的相关文章

配置系列:ssm中applicationContext-mybatis.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:p="http://www.springframework.org/schema/p&

配置系列:ssm中web.xml的简单配置

<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee htt

配置系列:ssm中applicationContext.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:p="http://www.springframework.org/schema/p&

6.Spring中AOP术语与XML方式简单实现

1.AOP术语 1. Joinpoint(连接点):所谓连接点是指那些被拦截到的点.在spring中,这些点指的是方法,因为spring只支持方法类型的连接点 2. Pointcut(切入点):所谓切入点是指我们要对哪些Joinpoint进行拦截的定义 3. Advice(通知/增强):所谓通知是指拦截到Joinpoint之后所要做的事情就是通知.通知分为前置通知,后置通知,异常通知,最终通知,环绕通知(切面要完成的功能) 4. Introduction(引介):引介是一种特殊的通知在不修改类代

配置系列:(事物管理)ssm中applicationContext-transaction.xml的简单配置

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/s

spring配置文件[servlet-name]-servlet.xml

注解式控制器简介: 在spring2.5之前都是通过实现controller接口或其实现来定义处理器类. spring2.5开始支持通过注解@controller和@requestmapping来定义处理器类,DefaultAnnotationHandlerMapping.AnnotationMethodHandlerAdapter为@controller和@requestmapping提供支持. spring3.0引入restful架构风格支持,引入了更多的注解. spring3.1使用新的H

HAProxy基本配置、调度算法与tcp、http、heath模式配置示例

一.HAProxy安装 1.HAProxy简单介绍 HAProxy虽然名字前有HA,但它并不是一款高可用软件,而是一款用于实现负载均衡的软件,可实现四层与七层的负载均衡. 2.yum安装HAProxy HAProxy已经包含在yum的base中,版本为1.15,可以直接yum安装 ~]# yum install -y haproxy HAProxy的配置文件路径为:/etc/haproxy/haproxy.cfg 主程序路径为:/usr/sbin/haproxy 3.HAProxy配置 HAPr

Servlet中Web.xml文件的配置

1 定义头和根元素 部署描述符文件就像所有XML文件一样,必须以一个XML头开始.这个头声明可以使用的XML版本并给出文件的字符编码.DOCYTPE声明必须立即出现在此头之后.这个声明告诉服务器适用的servlet规范的版本(如2.2或2.3)并指定管理此文件其余部分内容的语法的DTD(Document Type Definition,文档类型定义).所有部署描述符文件的顶层(根)元素为web-app.请注意,XML元素不像HTML,他们是大小写敏感的.因此,web-App和WEB-APP都是不

SSM框架中mapper和mapping.xml文件在同一个包下需要的配置

前言 当我们在开发过程中,由于maven项目本身的限制,我们不能直接把我们的mapper.xml文件和对应mapper.java接口文件放到一起,也就是不能直接放在java包中,如图:  因为maven项目在构建打包时,会从src/main/java中获取所有的java文件然后编译,会从src/main/resources中获取配置文件等其它文件,然后打包, 所以尽管你在Spring整合Mybatis时配置也好,在Mybatis单独的配置文件中配置也好,都是会出错的: <!--配置SqlSess