applciation.xml foundation configuration and description
来源:互联网 发布:知乎书店实体店 编辑:程序博客网 时间:2024/06/09 22:35
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:cache="http://www.springframework.org/schema/cache" xsi:schemaLocation=" http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.1.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> <!-- 自动扫描web包 ,将带有注解的类 纳入spring容器管理 --> <context:component-scan base-package="com.eduoinfo.finances.bank.web"></context:component-scan> <!-- 引入jdbc配置文件 --> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath*:jdbc.properties</value> </list> </property> </bean> <!-- dataSource 配置 --> <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close"> <!-- 基本属性 url、user、password --> <property name="url" value="${jdbc.url}" /> <property name="username" value="${jdbc.username}" /> <property name="password" value="${jdbc.password}" /> <!-- 配置初始化大小、最小、最大 --> <property name="initialSize" value="1" /> <property name="minIdle" value="1" /> <property name="maxActive" value="20" /> <!-- 配置获取连接等待超时的时间 --> <property name="maxWait" value="60000" /> <!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 --> <property name="timeBetweenEvictionRunsMillis" value="60000" /> <!-- 配置一个连接在池中最小生存的时间,单位是毫秒 --> <property name="minEvictableIdleTimeMillis" value="300000" /> <property name="validationQuery" value="SELECT 'x'" /> <property name="testWhileIdle" value="true" /> <property name="testOnBorrow" value="false" /> <property name="testOnReturn" value="false" /> <!-- 打开PSCache,并且指定每个连接上PSCache的大小 --> <property name="poolPreparedStatements" value="false" /> <property name="maxPoolPreparedStatementPerConnectionSize" value="20" /> <!-- 配置监控统计拦截的filters --> <property name="filters" value="stat" /> </bean> <!-- mybatis文件配置,扫描所有mapper文件 --> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean" p:dataSource-ref="dataSource" p:configLocation="classpath:mybatis-config.xml" p:mapperLocations="classpath:com/eduoinfo/finances/bank/web/dao/*.xml" /> <!-- spring与mybatis整合配置,扫描所有dao --> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer" p:basePackage="com.eduoinfo.finances.bank.web.dao" p:sqlSessionFactoryBeanName="sqlSessionFactory" /> <!-- 对dataSource 数据源进行事务管理 --> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager" p:dataSource-ref="dataSource" /> <!-- 配置使Spring采用CGLIB代理 --> <aop:aspectj-autoproxy proxy-target-class="true" /> <!-- 启用对事务注解的支持 --> <tx:annotation-driven transaction-manager="transactionManager" /> <!-- Cache配置 --> <cache:annotation-driven cache-manager="cacheManager" /> <bean id="ehCacheManagerFactory" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:configLocation="classpath:ehcache.xml" /> <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cacheManager-ref="ehCacheManagerFactory" /> </beans>
0 0
- applciation.xml foundation configuration and description
- Foundation XML and E4X for Flash and Flex
- mvn package 出错 pom.xml and web.xml configuration
- Project configuration is not up-to-date with pom.xml导入maven工程后,出现如下错误: Description Resource
- logback.xml常用配置详解<configuration> and <logger>
- logback.xml常用配置详解——<configuration> and <logger>
- ASCII table and description
- ASCII Table and Description
- EFLAGS description and implementation
- ASCII Table and Description
- Region Representaion and Description
- Property and xml configuration parse by using apache common lib commons-configuration.jar
- Windows Presentation Foundation Introduction(V) - Configuration & Deployment
- MorningSir AlarmClock (Description and Support)
- [Magento] Meta Description and SEO
- Saliency, Scale and Image Description
- Foundation XML for Flash
- ARC between Foundation and Core Foundation
- Android WebView 获取网页数据(html)
- eclipse设置自动注释
- 更改错误提示等级
- CodeForces 387A George and Sleep
- 知道这20个正则表达式,能让你少写1,000行代码
- applciation.xml foundation configuration and description
- Android 命名规则
- fixed 实现div居中
- 转:在Eclipse中关联Android Private Libraries中文件的源代码
- NoSQL的理解
- 排序算法-希尔排序
- linux命令---删除一个目录下的所有文件,但保留一个指定文件
- markdown 公式实例
- Map与JavaBean之间的相互转化