jeecms 2012 源码分析(8) 相关配置文件分析

1、Ovirt 开源虚拟化平台安装 Ovirt虚拟化Node和Engine安装 阅读详情

application-context.xml

 转载请标识出处 by chenbo:http://blog.youkuaiyun.com/chenbo19867758/article/details/12844765

  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  3.     xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"  
  4.     xmlns:context="http://www.springframework.org/schema/context"  
  5.     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
  6.     http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd  
  7.     http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd  
  8.     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"  
  9.     default-lazy-init="true">  
  10.   
  11.     <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">  
  12.         <property name="locations">  
  13.             <list>  
  14.                 <value>/WEB-INF/config/jdbc.properties</value>  
  15.             </list>  
  16.         </property>  
  17.     </bean>  
  18.     <!-- C3P0 数据库连接池配置 -->  
  19.     <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">  
  20.         <property name="driverClass" value="${jdbc.driverClassName}" />  
  21.         <property name="jdbcUrl" value="${jdbc.url}" />  
  22.         <property name="user" value="${jdbc.username}" />  
  23.         <property name="password" value="${jdbc.password}" />  
  24.         <!--连接关闭时默认将所有未提交的操作回滚。Default: false -->   
  25.         <property name="autoCommitOnClose" value="true"/>  
  26.         <!--当连接池用完时客户端调用getConnection()后等待获取新连接的时间,  
  27.             超时后将抛出 SQLException,如设为0则无限期等待。单位毫秒。Default: 0 -->   
  28.         <property name="checkoutTimeout" value="${cpool.checkoutTimeout}"/>  
  29.         <!--初始化时获取三个连接,取值应在minPoolSize与maxPoolSize之间。Default: 3 -->   
  30.         <property name="initialPoolSize" value="${cpool.minPoolSize}"/>  
  31.         <!--连接池中保留的最小连接数。-->   
  32.         <property name="minPoolSize" value="${cpool.minPoolSize}"/>  
  33.         <!--连接池中保留的最大连接数。Default: 15 -->   
  34.         <property name="maxPoolSize" value="${cpool.maxPoolSize}"/>  
  35.         <!--最大空闲时间,maxIdleTime秒内未使用则连 接被丢弃。若为0则永不丢弃。Default: 0 -->   
  36.         <property name="maxIdleTime" value="${cpool.maxIdleTime}"/>  
  37.         <!--当连接池中的连接耗尽的时候c3p0一次同时获取的连接数。Default: 3 -->   
  38.         <property name="acquireIncrement" value="${cpool.acquireIncrement}"/>  
  39.         <!--  
  40.             default : 0 单位 s  
  41.             这个配置主要是为了减轻连接池的负载,比如连接池中连接数因为某次数据访问高峰导致创建了很多数据连接  
  42.             但是后面的时间段需要的数据库连接数很少,则此时连接池完全没有必要维护那么多的连接,所以有必要将  
  43.             断开丢弃掉一些连接来减轻负载,必须小于maxIdleTime。配置不为0,则会将连接池中的连接数量保持到minPoolSize。  
  44.             为0则不处理。   
  45.          -->  
  46.         <property name="maxIdleTimeExcessConnections" value="${cpool.maxIdleTimeExcessConnections}"/>  
  47.     </bean>  
  48.     <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">  
  49.         <property name="dataSource" ref="dataSource"/>      
  50.         <property name="mappingLocations">  
  51.             <list>  
  52.                 <value>classpath*:/com/jeecms/core/entity/hbm/*.hbm.xml</value>  
  53.                 <value>classpath*:/com/jeecms/cms/entity/main/hbm/*.hbm.xml</value>  
  54.                 <value>classpath*:/com/jeecms/cms/entity/assist/hbm/*.hbm.xml</value>  
  55.             </list>  
  56.         </property>  
  57.         <property name="hibernateProperties">  
  58.             <value>  
  59.             <!-- 指定数据库方言 -->  
  60.             hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect  
  61.             <!-- 输出所有SQL语句到控制台 -->  
  62.             hibernate.show_sql=false  
  63.             <!-- 格式化输出sql语句 -->  
  64.             hibernate.format_sql=false  
  65.             <!--   
  66.                 这个配置意思是当你在Hibernate里面输入true的时候,Hibernate会转化为0插入数据库,  
  67.                 当你在Hibernate里面输入false的时候,Hibernate会转化为1插入数据库,  
  68.              -->  
  69.             hibernate.query.substitutions=true 1, false 0  
  70.             <!-- 指定每次提交SQL的数量。参数值越大,读数据库的次数越少,速度越快。 -->  
  71.             hibernate.jdbc.batch_size=20  
  72.             <!--   
  73.                 允许查询缓存,对经常使用的List查询方式,只有在使用查询缓存时,  
  74.                 才会从缓存中通过id去get缓存的值;查询缓存一般缓存查询语句和查询结果的id -->  
  75.             hibernate.cache.use_query_cache=true  
  76.             </value>  
  77.         </property>  
  78.         <property name="entityInterceptor">     
  79.             <ref local="treeInterceptor"/>  
  80.         </property>  
  81.         <property name="cacheProvider">  
  82.             <ref local="cacheProvider"/>  
  83.         </property>  
  84.         <property name="lobHandler">  
  85.             <ref bean="lobHandler" />  
  86.         </property>  
  87.     </bean>  
  88.     <!-- 处理 LOB 数据,CLOB 类型,BLOB 类型 -->  
  89.     <bean id="lobHandler" class="org.springframework.jdbc.support.lob.DefaultLobHandler" lazy-init="true"/>  
  90.   
  91.     <!-- 缓存 -->  
  92.     <bean id="cacheProvider" class="com.jeecms.common.hibernate3.SpringEhCacheProvider">  
  93.         <property name="configLocation">  
  94.             <value>classpath:ehcache-hibernate.xml</value>  
  95.         </property>  
  96.         <property name="diskStoreLocation">  
  97.             <value>/WEB-INF/cache/hibernate</value>  
  98.         </property>  
  99.     </bean>  
  100.     <!-- 栏目等树形结构 -->  
  101.     <bean id="treeInterceptor" class="com.jeecms.common.hibernate3.TreeIntercptor"/>  
  102.     <!-- 定义事务管理器(声明式的事务) -->    
  103.     <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">  
  104.         <property name="sessionFactory" ref="sessionFactory" />  
  105.     </bean>  
  106.     <!-- 是隐式地向 Spring 容器注册 -->  
  107.     <context:annotation-config/>  
  108.     <tx:annotation-driven transaction-manager="transactionManager" />  
  109. </beans> 
第 8 篇:TMC2240 电机正反转实现|DIR 引脚控制 + 代码优化(稳定不抖动) 本文详细介绍了TMC2240电机驱动芯片的正反转实现方法,重点解决方向切换时的抖动和冲击问题。文章首先明确了硬件连接、基础配置和使能状态三个前提条件,然后阐述了DIR引脚电平控制方向的核心原理,提供了STM32的GPIO配置代码。针对方向切换时的电流冲击问题,作者提出了"停止-延迟-切换-启动"的平滑切换逻辑,并给出了包含方向枚举、转速控制和方向切换函数的完整代码实现方案。通过这种优化方法,可以有效避免电机在正反转切换时产生的抖动、冲击声和发热问题,实现稳定的双向控制。文章还提示了后续可 阅读详情

相关推荐

reCAPTCHA v3隐形验证码实战:5分钟教你用Capsolver获取0.9高分令牌

本文提供了一份reCAPTCHA v3隐形验证码的实战指南,详细解析其浏览器评分机制,并手把手教你使用Capsolver自动化获取0.9高分令牌。内容涵盖从环境侦察、关键参数(sitekey与pageAction)提取,到API调用、结果轮询及令牌使用的完整流程,旨在帮助开发者高效绕过自动化交互障碍。

weixin_29314405的博客 348

glassfish创建连接池失败(Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.My)

1.向服务器已有实例glassfishv3\glassfish\domains\domain1\lib\ext目录下添加数据库驱动包 2.创建数据库连接池 3.创建数据为连接资源 4.发布应用 备注:glassfish V3 旧版当部署EJB应用时,如果没有事前添加数据库驱动包到glassfishv3\glassfish\domains\domain1\lib\ext下,部署也可以通过,但

Angiexia的专栏 6664

经典算法之——解决全排列问题以及详解

回溯”指的是“状态重置”,可以理解为“恢复现场”,是在编码的过程中,是为了节约空间而使用的,而在递归或者深度优先中根据需要的场合来配合回溯法可以进一步对自己的代码进行优化。, n-1, n},方向都为向左。邻位对换法是全排列生成算法中的其中一种,它的换位是双向的,通过保存数字的“方向性”来快速得到下一个排列。最后以 3 开头的全排列为[3, 1, 2], [3, 2, 1];以 1 开头的全排列为[1, 2, 3], [1, 3, 2];以 2 开头的全排列为[2, 1, 3], [2, 3, 1];

m0_68987535的博客 8795

JavaEE学习---JDBC-连接池异常

问题描述: An error has occurred Ping Connection Pool failed for MySQL. Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource Please check the server.log for more details. 警告: RAR8054: Exception while

weixin_44337475的博客 1119

群晖NAS断电后IP变了?3步搞定静态IP设置(附Linux挂载指南)

本文针对群晖NAS因断电重启导致IP地址变化的问题,提供了从根源到实践的完整解决方案。核心内容包括如何为NAS配置静态IP以彻底解决连接中断,并详细讲解了在Linux系统中通过NFS协议稳定挂载NAS共享文件夹的步骤与指南,确保网络存储服务持久可靠。

weixin_29271263的博客 858

车载测试工程师必备:5分钟搞定CANoe台架搭建(附DBC导入技巧)

本文为车载测试工程师提供快速搭建CANoe测试台架的实用指南,涵盖硬件连接、DBC文件导入及常见报错解决方案。通过详细步骤和高效技巧,帮助工程师在5分钟内完成台架搭建,提升车载测试效率,特别适合紧急功能验证场景。

potato的博客 813

访问 Glassfish 连接池出现 的错误

Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource解决方法如下图,我懒,不翻译了。No Password Cre

四眼咕喱 1973

使用sklearn学习多项式回归(三)

1,什么是线性 我们无数次提到”线性“这个名词。在支持向量机中,我们也曾经提到最初的支持向量机只能够分割线性可分的数据,然后引入了”核函数“来帮助我们分类那些非线性可分的数据。我们也曾经说起过,比如说决策树,支持向量机是”非线性“模型。所有的这些概念,让我们对”线性“这个词非常熟悉,却又非常陌生——因为我们并不知道它的真实含义。接下来我们看看线性回归模型改进的核心之一:帮助线性回归解决非线性问题。 1.1,变量之间的线性关系 ”线性“这个词用于描述不同事物时有着不同的含义。我们最常使用的线性是指“变量

理科男同学 5101

mysql5.5连接器,GlassFish 5和MySQL连接器

I use GlassFish 5 with mysql-connector-java-8.0.13.jarand CLASSPATH values:C:\Program Files\glassfish5\glassfish\libC:\Program Files\glassfish5\glassfish\domains\domain1\libC:\Program Files\glassfish5...

weixin_35617554的博客 195

使用jsch和commons-pool2为sftp创建连接池

使用jsch和common-pool2为sftp创建连接池

文若书生的专栏 3283

Qt/C++ 音视频开发 - FFmpeg 安卓版

通过将 FFmpeg 集成到 Qt/C++ 项目中,我们可以实现强大且灵活的音视频处理功能。本文介绍了在安卓平台上使用 FFmpeg 的基本步骤,包括初始化、解码、处理和编码等。实际应用代码示例展示了如何在安卓设备上播放视频。

走向CTO的路上... 1193

jeeCmsV7-src 源码解析之二(application-context.xml)

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframe

nipanlong001的专栏 768

小龙虾们的好伙伴专栏导航

本文系统解析了OpenClaw技术架构,包括Channel层和网关层的设计实现,并与AgentSkills等技术方案进行对比。同时提供了OpenClaw的系列实用指南,涵盖小龙虾培养、客户资源管理、系统自动化巡检以及技术趋势助手构建等应用场景,帮助用户从零成本入门到高效落地应用,实现业务全流程自动化管理。

wend的博客 214

jeecms 2012 源码分析(7) web.xml分析

JeeCms2012 contextConfigLocation /WEB-INF/config/application-context.xml /WEB-INF/config/cache-context.xml /WEB-INF/config/captcha-context.xml /WEB-INF/config/jeecor

chenbo19867758的专栏 3260

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

jeecms 2012 源码分析(三)------ Spring + FreeMarker的集成。

本节主要分析Spring + FreeMarker的集成。 先介绍一下 spring+freemarker的集成主要涉及以下配置项: 1、配置FreeMarkerConfigurer Xml代码   ……   通过freemarkerSettings属性,也能够设置其他FreeMarker的配置。例如,FreeMarker默认每隔5秒检

jun0052的专栏 2907

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

jeecms v9导入myeclipse 2015 ehcache.xml报错问题

1、找不到ehcache.xml文件问题 cache-context.xml <property name="configLocation"> <value>/WEB-INF/config/ehcache.xml</value> </property> 2、报错 2019-07-20 14:49:01 下午 [Thread...

weixin_30896825的博客 158

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

mysql xadatasource配置_eclipse – 没有为com.mysql.jdbc.jdbc2.optional.MysqlXADataSource设置部署到Glassfish类路径...

Glassfish未加载com.mysql.jdbc.jdbc2.optional.MysqlXADataSource包.抛出以下错误javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse PersistenceServices - 2.3.2.v20111125-r10461): org.ecli...

weixin_31748999的博客 446

mysql xadatasource配置_部署到Glassfish类路径未设置为com.mysql.jdbc.jdbc2.optional.MysqlXADataSource...

Glassfish is not loading the com.mysql.jdbc.jdbc2.optional.MysqlXADataSource package.The following error is thrownjavax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persiste...

weixin_34552443的博客 354

glassfish配置数据源出错

Ping failed Exception: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource

阿K_ay的专栏 1818

JDBC安装时classpath不必理会

source:https://zhidao.baidu.com/question/142969166.html jdbc连接mysql时,classpath怎么配置呀 classpath不用配,直接在eclipse的项目上点击右键,选Build Path。选Configure Build Path里的libraries选项卡.add external jars.把mysql的驱动包加入就可

tech 1257

mysql jdbc常见错误_jdbc中常见异常原因以及解决方法

jdbc中常见异常原因以及解决方法第一章:简介​ 在我们java开发者编写代码的过程中,经常会出现一些异常。那么对于运行时异常我们在代码中可以通过抓取(try catch)或者抛出(throws)的方式让代码编译通过。那么,在代码运行的时候,出现异常的时候该怎么解决呢?本文介绍了一些java中常见的异常的原因和解决的方法,最后分享了本人在开发中遇到异常时的一些解决技巧。今天给大家介绍...

weixin_39920629的博客 3651

The class name of an array object

Quote from Java API documentation https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getName-- If this class object represents a class of arrays, then the internal form of the name consi...

Ricardo's note 205

Class.forName(“com.mysql.jdbc.Driver“);报错java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

明明在java文件中测试的可以,但是不能再jsp中运行,进行断点调试显示Class.forName("com.mysql.jdbc.Driver");这一句都没有通过,报错java.lang.ClassNotFoundException: com.mysql.jdbc.Driver。主要的原因是没有给Tomcat配置mysql的连接池,可以用以下的方法进行配置:http://blog.csdn.n...

编程开发分享者的博客 4342

cacheManager加载问题

net.sf.ehcache.CacheException: Another unnamed CacheManager already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following: 系统会创建cacheManager

攻城狮Luke 7743
上一篇: jeecms 2012 源码分析(7) web.xml分析
下一篇: jeecms 2012 源码分析(3) 内容页静态化分析
robbin2117
博客等级 码龄14年 3粉丝 2原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值