自己项目中的proxool和applicationContext.xml写的

1.proxool.properties
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://192.168.1.116:3306/clearpro
jdbc.username=root
jdbc.password=123456
proxool.prototypeCount=2
proxool.hourseKeepingSleepTime=30
proxool.maximumActiveTime=30
proxool.maximumConnectionLifetime=3000
proxool.minimumConnectionCount=2
proxool.maximumConnectionCount=40
proxool.alias=clearpro
proxool.simultaneous-build-throttle=20

default.domain = http://oa.hechuanggroup.com

#default new user password
user.pwd = hcxy123456
user.pwd.sms = \u60A8\u5DF2\u91CD\u7F6E\u4E86\u5408\u521B\u5185\u7F51\u529E\u516C\u7CFB\u7EDF\u5E10\u53F7,\u65B0\u5BC6\u7801\u4E3A{\u5B57\u7B26}.\u3010\u5408\u521B\u5174\u4E1A\u3011

#system upload
#resource = D:/resource/
resource = /home/oa/resource/

#mail setting
mail.enable = true
mail.domain = hechuanggroup.com
mail.imap = 192.168.0.31
mail.smtp =192.168.0.31
#mail.attachmentdir = D:/users/
mail.attachmentdir = /home/oa/temp/
mail.maxfilesize = 10485760

#solr config
solr_server = http://127.0.0.1:8983/solr

#search highlight show
pre_tag = <font color="red">
post_tag = </font>

#search highlight show
private_root = /home/oa/document/private/
public_root = /home/oa/document/public/

pdf2swf_path = /home/oa/tools/swftools/bin/pdf2swf
OpenOffice_port = 8100
pdf_language = /home/oa/tools/xpdf-chinese-simplified

# 7niu
7niu.accesskey = dnNGXbFGN3-a3ckP8g7KrEt2o8XD833WswMjaevO
7niu.secretkey = h1N4PPnPe03lR8tsff3DhwLN673xRidhOJa50caa
7niu.bucket = lvtutu
7niu.host = http://7xlvx5.com1.z0.glb.clouddn.com



2.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:context="http://www.springframework.org/schema/context"
	xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:jee="http://www.springframework.org/schema/jee"
	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jpa="http://www.springframework.org/schema/data/jpa"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xsi:schemaLocation="
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
		http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.0.xsd
		http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.0.xsd
		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
		http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd"
	default-lazy-init="true">
	
	<description>Spring公共配置 </description>
	<context:annotation-config />
	<!-- 使用annotation 自动注册bean, 并保证@Required、@Autowired的属性被注入 不扫描controller -->
	<context:component-scan base-package="com.clearpro">
		<context:exclude-filter type="annotation"
			expression="org.springframework.stereotype.Controller" />
		<context:exclude-filter type="annotation"
			expression="org.springframework.web.bind.annotation.ControllerAdvice" />
	</context:component-scan>
	
	<!-- 属性文件加载配置 -->
	<bean id="propertyConfigurer"
		class="com.clearpro.common.property.ExtendedPropertyPlaceholderConfigurer">
		<property name="locations">
			<list>
				<!-- <value>classpath:application.properties</value> -->
				<value>classpath:proxool.properties</value>
			</list>
		</property>
	</bean>
	<!-- hibernate jpa适配器配置 -->
	<bean id="hibernateJpaVendorAdapter"
		class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
		<property name="databasePlatform">
			<bean factory-method="getDialect"
				class="com.clearpro.common.persistence.Hibernates">
				<constructor-arg ref="proxoolDataSource" />
			</bean>
		</property>
	</bean>
	<!-- Jpa Entity Manager 配置 -->
	<bean id="entityManagerFactory"
		class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" >
		<property name="dataSource" ref="proxoolDataSource" />
		<property name="jpaVendorAdapter" ref="hibernateJpaVendorAdapter" />
		<property name="packagesToScan" value="com.clearpro.entity" />
		<property name="jpaProperties">
			<props>
				<!-- 命名规则 My_NAME->MyName -->
				<prop key="hibernate.ejb.naming_strategy">org.hibernate.cfg.ImprovedNamingStrategy</prop>
				<prop key="hibernate.show_sql">true</prop>
				<!-- <prop key="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory -->
				<!-- </prop> -->
				<!-- <prop key="net.sf.ehcache.configurationResourceName">ehcache-hibernate-local.xml</prop> -->
			</props>
		</property>
	</bean>
	<!-- Spring Data Jpa配置 -->
	<jpa:repositories base-package="com.clearpro"
		transaction-manager-ref="transactionManager"
		entity-manager-factory-ref="entityManagerFactory" />
	<!-- Jpa 事务配置 -->
	<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
		<property name="entityManagerFactory" ref="entityManagerFactory" />
	</bean>
	<!-- 使用annotation定义事务 -->
		<!-- <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/> -->
	<!-- JSR303 Validator定义 -->
	<bean id="validator"
		class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" />
	<!-- 数据源配置, 使用Tomcat JDBC连接池 -->
	<!-- <bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource"
		destroy-method="close"> 
		<property name="driverClassName" value="${jdbc.driver}" />
		<property name="url" value="${jdbc.url}" />
		<property name="username" value="${jdbc.username}" />
		<property name="password" value="${jdbc.password}" />
		
		<property name="maxActive" value="${jdbc.pool.maxActive}" />
		<property name="maxIdle" value="${jdbc.pool.maxIdle}" />
		<property name="minIdle" value="0" />
		<property name="defaultAutoCommit" value="false" />
	</bean> -->
	 <bean id="proxoolDataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
		
		<property name="driver" value="${jdbc.driver}" />
		<property name="driverUrl" value="${jdbc.url}" />
		<property name="user" value="${jdbc.username}" />
		<property name="password" value="${jdbc.password}" />
	 <!-- 测试的SQL执行语句 -->
           <!-- <property name="houseKeepingTestSql" value="${proxool.houseKeepingTestSql}"/> -->
            <!-- 最少保持的空闲连接数 (默认2个) -->
             <property name="prototypeCount" value="${proxool.prototypeCount}"/>
            <!-- proxool自动侦察各个连接状态的时间间隔(毫秒),侦察到空闲的连接就马上回收,超时的销毁 默认30秒) -->
            <property name="houseKeepingSleepTime" value="${proxool.hourseKeepingSleepTime}"/>
            <!-- 最大活动时间(超过此时间线程将被kill,默认为5分钟) -->
             <property name="maximumActiveTime" value="${proxool.maximumActiveTime}"/>
            <!-- 连接最长时间(默认为4个小时) -->
            <property name="maximumConnectionLifetime" value="${proxool.maximumConnectionLifetime}"/>
            <!-- 最小连接数 (默认2个) -->
            <property name="minimumConnectionCount" value="${proxool.minimumConnectionCount}"/>
            <!-- 最大连接数 (默认5个) -->
            <property name="maximumConnectionCount" value="${proxool.maximumConnectionCount}"/>
            <!-- 
            <property name="statistics" value="${proxool.statistics}"/>-->
            <!-- 别名 -->
             <property name="alias" value="${proxool.alias}"/>
            <!-- -->
            <property name="simultaneousBuildThrottle" value="${proxool.simultaneous-build-throttle}"/>
	</bean> 
	 <!-- <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
           <property name="dataSource" ref="proxoolDataSource"/>
     </bean>  -->
	<!-- SpringMVC上传文件时,需配置MultipartResolver处理器 -->

	<bean id="multipartResolver" class="com.clearpro.common.web.CustomMultipartResolver">
		<!-- 指定所上传文件的总大小不能超过800KB......注意maxUploadSize属性的限制不是针对单个文件,而是所有文件的容量之和 -->
		<property name="maxUploadSize" value="1000000000" />
	</bean>
</beans>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值