oney.2.4.0.source-code.bee.properties.example.txt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of honey Show documentation
Show all versions of honey Show documentation
Honey is the implementation of the Bee.
The newest version!
# you can create a new bee.properties file override the default value.
#since V1.11
#1.base main and Override with active, 2.rebase to active(other file)
#1 : main file + other file; 2 : just active file(other file); if do not set , will use mail file.
#bee.profiles.type=0
#命名规则 name rule: bee-{active}.properties
#bee.profiles.active = test
#no dataSource
# if use dataSource,no need config in here.
#无数据源,直连方式.
#使用xml配置等其它数据源时,bee.properties里配置的驱动信息默认情况下将不会使用。
#没有使用数据源时,会使用这里的配置。
##bee.databaseName old key name
##When only one type of database is used, setting it can improve efficiency
#bee.db.dbName=MySQL
#bee.db.driverName = com.mysql.jdbc.Driver
#bee.db.url =jdbc:mysql://localhost:3306/{databaseName-eg:bee}?characterEncoding=UTF-8
#bee.db.username = userName
#bee.db.password = YourPassword
#since 2.1.10, value is:MySQL,Oracle. MySQL is default.
#bee.db.oceanbaseMode=MySQL
#bee.db.dbName=OceanBase
#since V1.11
#some db neee set,like cassandra's keyspace can set here
#bee.db.schemaName=store
#bee.db.jndiType=false
#bee.db.jndiName=jndi/Bee
#bee.db.pagingWithLimitOffset=false
##Android
#bee.db.isAndroid=false
#bee.db.androidDbName=bee.db
#bee.db.androidDbVersion=1
##HarmonyOS
#bee.db.isHarmony=false
#bee.db.harmonyDbName=bee.db
#bee.db.harmonyDbVersion=1
#bee.db.harmonyDbReadonly=false
# since v1.8
#log4j>slf4j>log4j2>androidLog>harmonyLog>systemLogger>fileLogger>noLogging>jdkLog>commonsLog
bee.osql.loggerType=systemLogger
#set log type for systemLoggerType(for develop):debugtable name, formatter: packagename.ClassName:tableName,packagename.ClassName:tableName
#Separate multiple options with comma. Package name can be omitted if they are not confused.
#Just config for special
#bee.osql.naming.entity2tableMappingList=User2:test_user,com.abc.user.User:test_user
#since 1.7.2
#default implement translate type. 1 : order_no<-->orderNo(DB<-->Java), 2: ORDER_NO<-->orderNo(DB<-->Java),
# 3: original, 4 : DbUpperAndJavaLower(since 1.17), ORDER_NO<-->order_no(DB<-->Java)
#if want to use other naming rule, you can define a new class implements NameTranslate
#default value is :1
bee.osql.naming.translateType=1
#since 1.17 同时使用多用不同命名转换
bee.osql.naming.useMoreTranslateType=false
#要是字段名全用大写,在命名转换前需要先转成小写,如ORDER_NO
#default: to LowerCase before. 默认是先转小写,因为如不转,DB字段用全大写时会出错
#但像mysql,默认不是全大写的,建议设为false,这样转换会更精准.
bee.osql.naming.toLowerCaseBefore=true
#bee.osql.moreTable.columnListWithStar=false
# since v1.7.0
#inner join type. use "join .. on" when true, or use "where ...=".Just there is one sub table, it is enable.
#bee.osql.sqlGenerate.moreTableSelect.2tablesWithJoinOnStyle=true #close in v1.9
#bee.osql.moreTable.twoTablesWithJoinOnStyle=false
#查询结果直接返回Json是否忽略null
bee.osql.selectJson.ignoreNull=true
#查询结果直接返回Json中, timestamp是否用毫秒表示
bee.osql.selectJson.timestampWithMillisecond=false
bee.osql.selectJson.dateWithMillisecond=false
bee.osql.selectJson.timeWithMillisecond=false
#since 1.9.8
bee.osql.selectJson.longToString=true
#查询结果返回List时,是否将null转为""
bee.osql.returnStringList.nullToEmptyString=false
#cache=======================start
#缓存类型
#bee.osql.cache.type=FIFO
#缓存集数据量数目
#bee.osql.cache.mapSize=20000
#resultset超过一定的值将不会放缓存
#bee.osql.cache.workResultSetSize=300
#缓存保存时间(毫秒 ms)
#bee.osql.cache.timeout=30000
#检测到超时,超过这个使用比例则顺便起线程清除缓存
bee.osql.cache.startDeleteRate=0.6
#缓存容量使用率;添加缓存,检测达到该使用率则清除一定比例缓存
bee.osql.cache.fullUsedRate=0.8
#添加缓存,检测到缓存容量快满时,删除缓存数的比例
bee.osql.cache.fullClearRate=0.2
#仅分库时(bee.dosql.multiDS.type=2),可用格式: dsName.tableName
#use table name, not entity name
#不缓存表的列表, 表名不区分大小写.视图强烈建议不放缓存,因会产生脏数据.
#bee.osql.cache.never=test_user
#永久缓存表的列表, 表名不区分大小写
#bee.osql.cache.forever=constant
#只有更改时才会清除缓存,以便同步新的值到缓存. 表名不区分大小写
#bee.osql.cache.modifySyn=para
# since v1.7.2. default value is: false (use cache)
#bee.osql.cache.nocache=false
#since v1.8.99
bee.osql.cache.keyUseMD5=true
#since V1.11
#prototype: 0 not prototype, but faster; 1:prototype,if have NotSerializableException, do not put in cache, slower, but safer; 2 : prototype, but if have NotSerializableException,return original
#high safe cache,the javabean(entity) need implements Serializable interface.
bee.osql.cache.prototype=1
bee.osql.cache.useLevelTwo=false
#永久和长久缓存默认不放二级缓存,其它一级缓存可通过该配置设置
bee.osql.cache.levelOneTolevelTwo=false
#二级缓存默认保存时间(秒 second)
#bee.osql.cache.levelTwoTimeout=180
#用这种,一个实体对应多个不同数据源则不行? 也可以表示几个数据源对应的表都放缓存
#bee.osql.cache.levelTwoEntityList=com.xxx.aa.Orders,com.xxx.bb.*,com.xxx.cc.**
#level 2 cache: Redis
#bee.osql.cacheRedis.host=localhost
#bee.osql.cacheRedis.port=
#bee.osql.cacheRedis.password=123456
#unit: second
#bee.osql.cacheRedis.connectionTimeout=6
#Read timed out, unit:second
#bee.osql.cacheRedis.soTimeout=6
#bee.osql.cacheRedis.database=
#bee.osql.cacheRedis.clientName=
#bee.osql.cacheRedis.ssl=
#2.1.7 eg:randTimeoutRate=0.2, bee.osql.cache.levelTwoTimeout=100 -> new timeOut is [80,120]
bee.osql.cache.randTimeoutRate=0.2
bee.osql.cache.randTimeoutAutoRefresh=false
#cache=======================end
#distributed environment
#1:SerialUniqueId ,2:OneTimeSnowflakeId ,3:PearFlowerId. default is 1.
#bee.distribution.genid.generatorType=1
#bee.distribution.genid.workerid=0
#bee.distribution.genid.startYear=
#bee.distribution.genid.forAllTableLongId=false
bee.distribution.genid.replaceOldId=true
#when forAllTableLongId=true, it woulb be disable.
#bee.distribution.genid.includesEntityList=com.xxx.aa.Orders,com.xxx.bb.*,com.xxx.cc.**
#bee.distribution.genid.excludesEntityList=com.xxx.aa.User,com.xxx.bb.*
#tolerateSecond need >=1
#bee.distribution.pearFlowerId.tolerateSecond=10
#bee.distribution.pearFlowerId.useHalfWorkId=false
#unit is second.
#bee.distribution.pearFlowerId.switchWorkIdTimeThreshold=120
#need >=1, default is 2. 梨花算法随机开始值的最大值(不包括边界)
#bee.distribution.pearFlowerId.randomNumBound=2
#--------Notice: do not support define sql in this model.
#DOSQL: Distributed Object SQL
#bee.dosql.multiDS.enable=true
#支持同时使用多种类型数据库的数据源.support different type database muli-Ds at same time.
#eg: have oracle,mysql,..., datasource
#bee.dosql.multiDS.differentDbType=true
#用于在HoneyFactory获取Suid,SuidRich的对象时生成Mongodb的
bee.dosql.multiDS.justMongodb=false
#bee.dosql.multiDS.defalutDS=ds1
#bee.dosql.multiDS.sharding=false
#不是广播表,才有效(V2.1) for not Broadcast table(V2.1)
bee.dosql.sharding.forkJoinBatchInsert=false
bee.dosql.sharding.jdbcStreamSelect=true
#since 2.0 设置是否不支持union? include union,union all
bee.dosql.sharding.notSupportUnionQuery=false
#since 2.1.7
#bee.dosql.sharding.executorSize=0
# 1:only r/w, one main and more sub-database; 2:only more database (table name is same)
#bee.dosql.multiDS.type=1
#bee.dosql.multiDS.defalutDS=ds1
#when type is 1
#write DB just set one db.
#bee.dosql.multiDS.writeDB=ds1
#bee.dosql.multiDS.readDB=ds2,ds3
#poll:1, rand:2
#bee.dosql.multiDS.rDbRouteWay=1
#when type is 2
#bee.dosql.multiDS.defalutDS=ds1
#bee.dosql.multiDS.type=2
#不同ds用分号隔开 同一ds用逗号隔开.Different DS are separated by semicolons and the same DS by commas.
#仅分库时,不同库有相同的表名,对应的Entity所在的包名不能相同(若在java代码中手动指定ds,则会污染代码)
#bee.dosql.multiDS.matchEntityClassPath=ds2:com.xxx.aa.User,com.xxx.bb.*,com.xxx.cc.**;ds3:com.xxx.dd.User
#config datasource and table relation
#bee.dosql.multiDS.matchTable=ds2:test_user
#若没有配置bee.dosql.multiDS.type,则根据具体情况确定数据源
#############Bee+Spring boot,使用多个数据源时,需要在spring boot工程的Application类添加:
#@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
#或者,在application.properties里添加:
#spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
#bee.db.dbs[i].type value :Hikari,Druid,c3p0,dbcp2,Tomcat,BeeMongo, default is : Hikari
#Hikari
#Hikari专用:
#bee.db.dbs[0].driverClassName = com.mysql.jdbc.Driver
#bee.db.dbs[0].jdbcUrl =jdbc:mysql://localhost:3306/bee?characterEncoding=UTF-8&useSSL=false
#Bee作了兼容处理 driverName->driverClassName ; url ->jdbcUrl
#############Bee+Spring boot,使用多个数据源,配置实例
#dbs数组,其它下标,是否从首个元素继承属性(但dsName不能继承)
#bee.db.extendFirst=true
#
#bee.db.dbs[0].dsName=ds0
#bee.db.dbs[0].driverClassName = com.mysql.jdbc.Driver
#bee.db.dbs[0].jdbcUrl =jdbc:mysql://localhost:3306/bee?characterEncoding=UTF-8&useSSL=false
#bee.db.dbs[0].username = root
#bee.db.dbs[0].password =123456
#
#bee.db.dbs[1].dsName=ds1
#bee.db.dbs[1].driver-class-name = com.mysql.jdbc.Driver
#bee.db.dbs[1].jdbcUrl =jdbc:mysql://localhost:3306/pro?characterEncoding=UTF-8&useSSL=false
#bee.db.dbs[1].username = root
#bee.db.dbs[1].password =123456
############# Bee+Spring boot,使用单个数据源,配置实例
## 数据源配置 ; 默认是:HikariPool
#spring.datasource.url=jdbc:mysql://localhost:3306/bee?characterEncoding=UTF-8&useSSL=false
##spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#spring.datasource.driverClassName=com.mysql.jdbc.Driver
#spring.datasource.username=root
#spring.datasource.password=123456
#Sharding分片properties风格配置(与springboot整合时,可以使用yaml方式),since 2.4.0
#Java风格配置,可参考bee-exam工程的ShardingInitData.java
#ShardingConfig.addShardingBean("orders",new ShardingBean("ds[0..1].orders[0..5]", "orderid"));
#bee.db.sharding[0].baseTableName=orders
#设置表对应的Class类也可以(要包括包名)
#bee.db.sharding[0].className=org.teasoft.exam.Orders
#bee.db.sharding[0].fullNodes=ds[0..1].orders[0..5]
#用于分片的表字段.
#bee.db.sharding[0].tabField=orderid
##其它可设置字段
#bee.db.sharding[0].dsField =
#bee.db.sharding[0].dsAlgorithm =
#bee.db.sharding[0].tabAssignType =
#bee.db.sharding[0].tabAlgorithm =
#bee.db.sharding[0].dsRule =
#bee.db.sharding[0].dsName =
#bee.db.sharding[0].tabRule =
#bee.db.sharding[0].dsShardingValue =
#bee.db.sharding[0].tabShardingValue=