<?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:aop="http://www.springframework.org/schema/aop"xmlns:context="http://www.springframework.org/schema/context"xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:mvc="http://www.springframework.org/schema/mvc"xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"xmlns:util="http://www.springframework.org/schema/util"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsdhttp://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsdhttp://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsdhttp://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsdhttp://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd"><!--使Spring支持自动检测组件,如注解的@Controller --><context:component-scan base-package="com.parry.test.*" /><beanclass="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" /><beanclass="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" /><!-- 数据库配置 --><bean id="dataSource" class="com.jolbox.bonecp.BoneCPDataSource"destroy-method="close"><property name="driverClass" value="com.mysql.jdbc.Driver" /><!-- 测试数据库 --><property name="jdbcUrl"value="jdbc:mysql://127.0.0.1:3066/TESTDB?useUnicode=true&amp;characterEncoding=UTF-8&amp;allowMultiQueries=true" /><property name="username" value="root" /><property name="password" value="root" /><!-- 检查数据库连接池中空闲连接的间隔时间,单位是分,默认值:240,如果要取消则设置为0 --><property name="idleConnectionTestPeriod" value="240" /><!-- 连接池中未使用的链接最大存活时间,单位是分,默认值:30,如果要永远存活设置为0 --><!-- 数据库连接池过期时间应小于等于mysql的过期时间和mycat的过期时间 --><property name="idleMaxAge" value="20" /><!-- 每个分区最大的连接数 --><property name="maxConnectionsPerPartition" value="100" /><!-- 每个分区最小的连接数 --><property name="minConnectionsPerPartition" value="20" /><!-- 分区数 ,默认值2,最小1,推荐3-4,视应用而定 --><property name="partitionCount" value="1" /><!-- 每次去拿数据库连接的时候一次性要拿几个,默认值:2 --><property name="acquireIncrement" value="2" /><!-- 缓存prepared statements的大小,默认值:0 --><property name="statementsCacheSize" value="0" /><property name="connectionTimeoutInMs" value="100" /><!-- 每个分区释放链接助理进程的数量,默认值:3,除非你的一个数据库连接的时间内做了很多工作,不然过多的助理进程会影响你的性能 --><property name="releaseHelperThreads" value="3" /></bean><!-- 配置SqlSessionFactoryBean --><bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"><property name="dataSource" ref="dataSource" /><property name="configLocation" value="classpath:mybatis.xml" /><!-- mapper和resultmap配置路径 --><property name="mapperLocations"><list><!-- 表示在com.sfpay.mapper包或以下所有目录中,以-resultmap.xml结尾所有文件 --><value>classpath:com/parry/test/dao/config/*.xml</value></list></property></bean><!-- 配置mapper接口 --><bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"><property name="basePackage" value="com.cn21.calendar.dao" /></bean><bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate"><constructor-arg index="0" ref="sqlSessionFactory" /></bean><!-- 事务配置 --><bean id="transactionManager"class="org.springframework.jdbc.datasource.DataSourceTransactionManager"><property name="dataSource" ref="dataSource" /></bean><!-- 用于持有ApplicationContext,可以使用SpringContextHolder.getBean('xxxx')的静态方法得到spring bean对象 --><bean class="com.parry.test.springcontext.SpringContextHolder"lazy-init="false" /><!-- 定时器 begin --><!-- 赛程 调度业务对象 --><bean id="deletePastOrderJob" class="com.parry.test.function.PublicTypeFunction" /><!-- 赛程 调度业务 --><bean id="deletePastOrderTask"class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"><property name="targetObject" ref="deletePastOrderJob" /><property name="targetMethod" value="deletePastOrder" /></bean><!-- 赛程 调度器触发器 每天早上07:00执行一次 --><bean id="deletePastOrderTaskTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"><property name="jobDetail" ref="deletePastOrderTask" /><property name="cronExpression" value="0 13 09 * * ? *" /></bean><!-- 设置调度 --><bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"><property name="triggers"><list><!-- <ref bean="deletePastOrderTaskTrigger" /> --></list></property></bean><!-- 定时器 end --><!-- 服务器启动,初始化项目配置参数 --><bean name="InitalizeBean" class="com.parry.test.configure.impl.InitalizeBean" />
</beans>

springMVC之applicationcontext.xml配置说明相关推荐

  1. SpringMVC之context-dispatcher.xml,了解基本的控制器

    SpringMVC之context-dispatcher.xml,了解基本的控制器 转载 :https://blog.csdn.net/qing_gee/article/details/5089529 ...

  2. SpringMVC XXX-servlet.xml ApplicationContext.xml

    因为直接使用了SpringMVC,所以之前一直不明白xxx-servlet.xml和applicationContext.xml是如何区别的,其实如果直接使用SpringMVC是可以不添加applic ...

  3. Spring中的applicationContext.xml与SpringMVC的xxx-servl

    2019独角兽企业重金招聘Python工程师标准>>> 一直搞不明白两者的区别. 如果使用了SpringMVC,事实上,bean的配置完全可以在xxx-servlet.xml中进行配 ...

  4. 浅谈配置文件:spring-servlet.xml(spring-mvc.xml) 与 applicationContext.xml

    在搭建 spring mvc 的框架时,会有2个配置文件必不可少: spring-servlet.xml 和applicationContext.xml.第一次接触spring mvc的工程师可能会对 ...

  5. IDEA + Maven创建SpringMVC项目和XML配置

    IDEA + Maven +SpringMVC + XML配置 1. 运行出默认 index.jsp 页面 1.1 构建Maven项目 1.2 设置pom.xml 1.3 设置Spring MVC框架 ...

  6. Spring中,applicationContext.xml 配置文件在web.xml中的配置详解

    Spring中,applicationContext.xml 配置文件在web.xml中的配置详解 2016年10月04日 15:22:26 阅读数:7936 转自http://www.cnblogs ...

  7. spring报错parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]

    一. 报错如下: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML doc ...

  8. 关于“Could not open ServletContext resource [/WEB-INF/applicationContext.xml]”解决方案

    问题产生 最近学了Maven,并尝试将以前的项目(springmvc+myabtis)重构成Maven项目,Maven项目推荐各种资源文件都放在src/java/resources目录下,所以我自然把 ...

  9. “Could not open ServletContext resource [/WEB-INF/applicationContext.xml]”解决方案

    本文部分内容转自[原文] 问题表现: 如果不解决问题,将无法正常访问项目 HTTP Status 404 – Not FoundType Status ReportMessage /ssmtest/D ...

  10. Spring学习总结(7)——applicationContext.xml 配置文详解

    web.xml中classpath:和classpath*:  有什么区别? classpath:只会到你的class路径中查找找文件; classpath*:不仅包含class路径,还包括jar文件 ...

最新文章

  1. 部分人说 Java 的性能已经达到甚至超过 C++,是真的吗?
  2. spring+mybatis整合读取不了配置文件
  3. 简单的实现微信获取openid
  4. python中def fun(a、b=200)_python中的函数的参数和可变参数
  5. windows mysqldump 不成功 1049 1064 报错
  6. IDEA项目中 target 目录的作用
  7. 3月国内网民地域分布12强:广东居首 江苏重回第二
  8. esxi 命令行格式化硬盘
  9. 数字光栅投影技术——相移轮廓术(PSP)
  10. android仿京东跑马灯,RecyclerView实现跑马灯效果
  11. Scikit-learn中的Lasso/LassoCV以及R^2可决系数的分析与讨论
  12. 解决Gitlab的The remote end hung up unexpectedly错误
  13. 中国儿童乐园行业市场建设现状分析与营销策略研究报告2022版
  14. ZigBee学习笔记——(三)ZigBee无线传感器网络通信标准
  15. KISSY基础篇乄KISSY之IO(1)
  16. 电子邮件签名档 HTML 手写时的折腾(附 原创工具)
  17. android+查询彩信号码,android 短信 彩信 数据库
  18. 创世战车服务器维护,《创世战车》5月24日版本更新内容公告
  19. RO段、RW段和ZI段 --Image$$??$$Limit 含义
  20. 维护盘pe linux,不进入pe系统也能轻松维护硬盘,简直神器!

热门文章

  1. Atitit Atitit 图像处理之  Oilpaint油画滤镜 水彩画 源码实现
  2. atitit.跨架构 bs cs解决方案. 自定义web服务器的实现方案 java .net jetty  HttpListener
  3. atitit.文件上传带进度条的实现原理and组件选型and最佳实践总结O7
  4. paip.索引优化---sql distict—order by 法
  5. Python : Arrow、Pyarrow库、以及与Julia互读
  6. 央行等四部门发布资管新规全文
  7. (转)基于FPGA技术的FAST行情解码研究
  8. 【图像融合】基于matlab高斯金字塔+拉普拉斯金字塔彩色水下图像融合【含Matlab源码 1629期】
  9. 毕设题目:Matlab语音去噪
  10. 【聚类分析】基于matlab交通干道车流量FCM聚类分析及预测【含Matlab源码 1141期】