All Downloads are FREE. Search and download functionalities are using the official Maven repository.

work.nano-orm-jdbc.1.4.6.source-code.jdbc-template.properties Maven / Gradle / Ivy

There is a newer version: 1.4.10
Show newest version
#
# Copyright 2015-2016 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# JDBC属性模板文件
#
# @author yanghe
# @date 2015年7月30日 下午4:19:56 
#
# Mybatis模式
mybatis.environment.id=

# 原生JDBC模式,使用JDBC模式时不能使用JdbcHelper来初始化JDBC.driver和JDBC.url的属性,只能主动设置
# JDBC.environment.id=

# Mybatis模式下需要将mapper包路径写在这里,如果不写在这里的话默认读取与mapper.package.jdbc属性相同的属性文件中
# 如果无法找到该属性的话则抛出异常。
# mapper.package.name=

# 连接池选项,目前支持: C3P0, DRUID, Tomcat Jdbc Pool. 默认使用DRUID连接池
# JDBC.pool.type=

# 自定义驱动和连接串
# 驱动类名
JDBC.driver=

# 连接串
JDBC.url=

# 用户名
JDBC.username=

# 密码
JDBC.password=

#######################################################################################
####################      Mybatis Settings      #######################################
#######################################################################################
# 这个配置使全局的映射器启用或禁用缓存。 
# 有效值: true | false  默认值: true
mybatis.settings.cacheEnabled=true

# 全局启用或禁用延迟加载。当禁用时, 所有关联对象都会即时加载。 
# 该值可以通过使用fetchType属性取代特定关系。
# 有效值: true | false  默认: false
mybatis.settings.lazyLoadingEnabled=false

# 当启用时, 有延迟加载属性的对象在被调用时将会完全加载任意属性。 否则, 每种属性将会按需要加载。
# 有效值: true | false  默认: true
mybatis.settings.aggressiveLazyLoading=true

# 允许或不允许多种结果集从一个单独的语句中返回(需要适合的驱动)
# 有效值: true | false  默认: true
mybatis.settings.multipleResultSetsEnabled=true

# 使用列标签代替列名。 不同的驱动在这方便表现不同。 参考驱动文档或充分测试两种方法来决定所使用的驱动。
# 有效值: true | false  默认: true
mybatis.settings.useColumnLabel=true

# 允许JDBC支持生成的键。 需要适合的驱动。 如果设置为 true 则这个设置强制生成的键被使用, 尽管一些驱动拒绝兼容但仍然有效(比如 Derby)
# 有效值: true | false  默认: false
mybatis.settings.useGeneratedKeys=false

# 指定 MyBatis 如何自动映射列到字段/属性。PARTIAL只会自动映射简单, 没有嵌套的结果。FULL 会自动映射任意复杂的结果(嵌套的或其他情况)   
# 有效值: NONE | PARTIAL | FULL  默认: PARTIAL
mybatis.settings.autoMappingBehavior=PARTIAL

# 配置默认的执行器。SIMPLE 执行器没有什么特别之处。REUSE 执行器重用预处理语句。BATCH 执行器重用语句和批量更新
# 有效值: SIMPLE | REUSE | BATCH  默认: SIMPLE
mybatis.settings.defaultExecutorType=SIMPLE

# 设置超时时间, 它决定驱动等待一个数据库响应的时间。
# 有效值: 任何正整数  默认: Not Set (null)
mybatis.settings.defaultStatementTimeout=

# 允许在嵌套语句上使用RowBounds。
# 有效值: true | false  默认: false
mybatis.settings.safeRowBoundsEnabled=false

# 启用从经典数据库列名称A_COLUMN到骆驼案例经典Java属性名称aColumn的自动映射。
# 有效值: true | false  默认: false
mybatis.settings.mapUnderscoreToCamelCase=false

# MyBatis使用本地缓存来阻止循环引用,并加快重复的嵌套查询。
# 默认情况下(SESSION)在会话期间执行的所有查询都被缓存。
# 如果localCacheScope = STATEMENT本地会话将仅用于执行语句,则在同一个SqlSession的两个不同调用之间不会共享任何数据。
# 有效值: SESSION | STATEMENT  默认: SESSION
mybatis.settings.localCacheScope=SESSION

# 在没有为参数提供特定JDBC类型时指定空值的JDBC类型。 一些驱动程序需要指定列JDBC类型,但其他驱动程序需要使用通用值(如NULL,VARCHAR或OTHER)。
# 有效值: NULL, VARCHAR and OTHER  默认: OTHER
mybatis.settings.jdbcTypeForNull=OTHER

# 指定哪个对象的方法触发延迟加载
# 有效值: 用逗号分隔的方法名称列表  默认: equals,clone,hashCode,toString
mybatis.settings.lazyLoadTriggerMethods=equals,clone,hashCode,toString

# 指定动态SQL生成默认使用的语言。
# 有效值: 类别名或完整类名  默认: org.apache.ibatis.scripting.xmltags.XMLDynamicLanguageDriver
mybatis.settings.defaultScriptingLanguage=org.apache.ibatis.scripting.xmltags.XMLDynamicLanguageDriver

# 当结果集中含有Null值时是否执行映射对象的setter或者Map对象的put方法。此设置对于原始类型如int,boolean等无效。
# 有效值: true | false  默认: false
mybatis.settings.callSettersOnNulls=false

# 指定MyBatis将添加到记录器名称的前缀字符串。
# 有效值: 任意字符串  默认: 未设置
mybatis.settings.logPrefix=

# 指定MyBatis应该使用哪个日志记录实现。 如果此设置不存在,则会自动发现实施。
# 有效值: SLF4J | LOG4J | LOG4J2 | JDK_LOGGING | COMMONS_LOGGING | STDOUT_LOGGING | NO_LOGGING  默认: 未设置
mybatis.settings.logImpl=

# 指定MyBatis将用于创建延迟加载能力对象的代理工具。
# 有效值: CGLIB | JAVASSIST  默认: CGLIB
mybatis.settings.proxyFactory=CGLIB

#######################################################################################
####################        C3P0连接池配置        #######################################
#######################################################################################
# 当连接池中的连接耗尽的时候c3p0一次同时获取的连接数。Default: 3
# c3p0.acquireIncrement=3

# 定义在从数据库获取新连接失败后重复尝试的次数。Default: 30
# c3p0.acquireRetryAttempts=30

# 两次连接中间隔时间,单位毫秒。Default: 1000
# c3p0.acquireRetryDelay=1000

# 连接关闭时默认将所有未提交的操作回滚。Default: false
# c3p0.autoCommitOnClose=false

# c3p0将建一张名为Test的空表,并使用其自带的查询语句进行测试。
# 如果定义了这个参数那么属性preferredTestQuery将被忽略。
# 你不能在这张Test表上进行任何操作,它将只供c3p0测试使用。Default: null
# c3p0.automaticTestTable=c3p0_test

# 获取连接失败将会引起所有等待连接池来获取连接的线程抛出异常。
# 但是数据源仍有效保留,并在下次调用getConnection()的时候继续尝试获取连接。
# 如果设为true,那么在尝试获取连接失败后该数据源将申明已断开并永久关闭。Default: false
# c3p0.breakAfterAcquireFailure=false

# 当连接池用完时客户端调用getConnection()后等待获取新连接的时间,超时后将抛出SQLException。
# 如设为0则无限期等待, 单位毫秒, Default: 0
# c3p0.checkoutTimeout=10000

# 通过实现ConnectionTester或QueryConnectionTester的类来测试连接。
# 类名需制定全路径。Default: com.mchange.v2.c3p0.impl.DefaultConnectionTester
# c3p0.connectionTesterClassName=

# 指定c3p0 libraries的路径,如果(通常都是这样)在本地即可获得那么无需设置,默认null即可 Default: null
# c3p0.factoryClassLocation=null

# Strongly disrecommended. Setting this to true may lead to subtle and bizarre bugs.(文档原文)作者强烈建议不使用的一个属性
# c3p0.forceIgnoreUnresolvedTransactions=false

# 每隔多少秒检查一次所有连接池中的空闲连接。Default: 0
# c3p0.idleConnectionTestPeriod=60

# 初始化时获取三个连接,取值应在minPoolSize与maxPoolSize之间。Default: 3
# c3p0.initialPoolSize=3

# 最大空闲时间,隔多少秒内未使用则连接被丢弃。若为0则永不丢弃。Default: 0
# c3p0.maxIdleTime=60

# 连接池中保留的最大连接数。Default: 15
# c3p0.maxPoolSize=10

# JDBC的标准参数,用以控制数据源内加载的PreparedStatements数量。
# 但由于预缓存的statements属于单个connection而不是整个连接池。
# 所以设置这个参数需要考虑到多方面的因素。如果maxStatements与maxStatementsPerConnection均为0,则缓存被关闭。Default: 0
# c3p0.maxStatements=0

# maxStatementsPerConnection定义了连接池内单个连接所拥有的最大缓存statements数。Default: 0
# c3p0.maxStatementsPerConnection=0

# c3p0是异步操作的,缓慢的JDBC操作通过帮助进程完成。扩展这些操作可以有效的提升性能通过多线程实现多个操作同时被执行。Default: 3
# c3p0.numHelperThreads=3

# 当用户调用getConnection()时使root用户成为去获取连接的用户。主要用于连接池连接非c3p0的数据源时。Default: null
# c3p0.overrideDefaultUser=

# 与overrideDefaultUser参数对应使用的一个参数。Default: null
# c3p0.overrideDefaultPassword=

# 定义所有连接测试都执行的测试语句。在使用连接测试的情况下这个一显著提高测试速度。注意:测试的表必须在初始数据源的时候就存在。Default: null
# c3p0.preferredTestQuery=select 1

# 用户修改系统配置参数执行前最多等待300秒。Default: 300
# c3p0.propertyCycle=300

# 因性能消耗大请只在需要的时候使用它。
# 如果设为true那么在每个connection提交的时候都将校验其有效性。
# 建议使用idleConnectionTestPeriod或automaticTestTable等方法来提升连接测试的性能。Default: false
# c3p0.testConnectionOnCheckout=false

# 如果设为true那么在取得连接的同时将校验连接的有效性。Default: false
# c3p0.testConnectionOnCheckin=false

#######################################################################################
####################        DRUID连接池配置        ######################################
#######################################################################################
# 初始化连接数量
# druid.initialSize=1

# 最大并发连接数
# druid.maxActive=5

# 最小空闲连接数
# druid.minIdle=1

# 配置获取连接等待超时的时间
# druid.maxWait=30000

# 超过时间限制是否回收 
# druid.removeAbandoned=true

# 超过时间限制多长 
# druid.removeAbandonedTimeout=180

# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 
# druid.timeBetweenEvictionRunsMillis=10000

# 配置一个连接在池中最小生存的时间,单位是毫秒
# druid.minEvictableIdleTimeMillis=60000

# 用来检测连接是否有效的sql,要求是一个查询语句
# druid.validationQuery=select 1

# 申请连接的时候检测
# druid.testWhileIdle=true

# 申请连接时执行validationQuery检测连接是否有效,配置为true会降低性能
# druid.testOnBorrow=false

# 归还连接时执行validationQuery检测连接是否有效,配置为true会降低性能
# druid.testOnReturn=false

# 打开PSCache,并且指定每个连接上PSCache的大小
# druid.poolPreparedStatements=true

# druid.maxPoolPreparedStatementPerConnectionSize=20

# 属性类型是字符串,通过别名的方式配置扩展插件,
# 常用的插件有: 
#	监控统计用的filter:stat 
#	日志用的filter:log4j  
# 	防御SQL注入的filter:wall
# druid.filters=stat


#######################################################################################
#################        Tomcat Jdbc连接池配置        ###################################
#######################################################################################

# (int) The initial number of connections that are created when the pool is started. 
# Default value is 10
# tomcat.jdbc.pool.initialSize=1

# (int) The minimum number of established connections that should be kept in the pool at all times. 
# The connection pool can shrink below this number if validation queries fail. 
# Default value is derived from initialSize:10 (also see testWhileIdle)
# tomcat.jdbc.pool.minIdle=1

# (int) The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception. 
# Default value is 30000 (30 seconds)
# tomcat.jdbc.pool.maxWait=30000

# (int) The maximum number of active connections that can be allocated from this pool at the same time. 
# The default value is 100
# tomcat.jdbc.pool.maxActive=5

# (boolean) The indication of whether objects will be validated by the idle object evictor (if any). 
# If an object fails to validate, it will be dropped from the pool. 
# NOTE - for a true value to have any effect, the validationQuery or validatorClassName parameter must be set to a non-null string. 
# The default value is false and this property has to be set in order for the pool cleaner/test thread is to run (also see timeBetweenEvictionRunsMillis)
# tomcat.jdbc.pool.testWhileIdle=true

# (boolean) The indication of whether objects will be validated before being borrowed from the pool. 
# If the object fails to validate, it will be dropped from the pool, and we will attempt to borrow another. 
# NOTE - for a true value to have any effect, the validationQuery or validatorClassName parameter must be set to a non-null string. 
# In order to have a more efficient validation, see validationInterval. Default value is false
# tomcat.jdbc.pool.testOnBorrow=false

# (String) The SQL query that will be used to validate connections from this pool before returning them to the caller. 
# If specified, this query does not have to return any data, it just can't throw a SQLException. 
# The default value is null. Example values are SELECT 1(mysql), select 1 from dual(oracle), SELECT 1(MS Sql Server)
# tomcat.jdbc.pool.validationQuery=select 1

# (boolean) The indication of whether objects will be validated before being returned to the pool. 
# NOTE - for a true value to have any effect, the validationQuery or validatorClassName parameter must be set to a non-null string. 
# The default value is false.
# tomcat.jdbc.pool.testOnReturn=false

# (long) avoid excess validation, only run validation at most at this frequency - time in milliseconds. 
# If a connection is due for validation, but has been validated previously within this interval, it will not be validated again. 
# The default value is 30000 (30 seconds).
# tomcat.jdbc.pool.validationInterval=30000

# (int) The number of milliseconds to sleep between runs of the idle connection validation/cleaner thread. 
# This value should not be set under 1 second. It dictates how often we check for idle, abandoned connections, and how often we validate idle connections. 
# The default value is 5000 (5 seconds). 
# tomcat.jdbc.pool.timeBetweenEvictionRunsMillis=5000

# (boolean) Flag to log stack traces for application code which abandoned a Connection. 
# Logging of abandoned Connections adds overhead for every Connection borrow because a stack trace has to be generated. 
# The default value is false.
# tomcat.jdbc.pool.logAbandoned=false

# (boolean) Flag to remove abandoned connections if they exceed the removeAbandonedTimeout. 
# If set to true a connection is considered abandoned and eligible for removal if it has been in use longer than the removeAbandonedTimeout 
# Setting this to true can recover db connections from applications that fail to close a connection. 
# See also logAbandoned The default value is false.
# tomcat.jdbc.pool.removeAbandoned=false

# (int) Timeout in seconds before an abandoned(in use) connection can be removed. 
# The default value is 60 (60 seconds). 
# The value should be set to the longest running query your applications might have.
# tomcat.jdbc.pool.removeAbandonedTimeout=60

# (int) The minimum amount of time an object may sit idle in the pool before it is eligible for eviction. 
# The default value is 60000 (60 seconds).
# tomcat.jdbc.pool.minEvictableIdleTimeMillis=60000

# (String) A semicolon separated list of classnames extending org.apache.tomcat.jdbc.pool.JdbcInterceptor class. 
# See Configuring JDBC interceptors below for more detailed description of syntaz and examples.
#
# These interceptors will be inserted as an interceptor into the chain of operations on a java.sql.Connection object. The default value is null.
# 
# Predefined interceptors:
# org.apache.tomcat.jdbc.pool.interceptor.
# ConnectionState - keeps track of auto commit, read only, catalog and transaction isolation level.
# org.apache.tomcat.jdbc.pool.interceptor.
# StatementFinalizer - keeps track of opened statements, and closes them when the connection is returned to the pool.
# 
# More predefined interceptors are described in detail in the JDBC Interceptors section.
# tomcat.jdbc.pool.jdbcInterceptors=

# (boolean) Register the pool with JMX or not. 
# The default value is true.
# tomcat.jdbc.pool.jmxEnabled=true





© 2015 - 2025 Weber Informatics LLC | Privacy Policy