Record Class HuicheProperties
java.lang.Object
java.lang.Record
org.huiche.spring.boot.autoconfigure.HuicheProperties
- Record Components:
enumBy- 枚举取值方式nullToEmpty- 集合类型为null时是否返回空集合useNational- 是否使用国家字符集,影响jdbc读写使用getNString还是getString等,一般建议不指定,默认会读取数据库设置batchSize- 批量插入时每次执行条数enableSerializationMapper- 是否启用序列化转换器blockUnconditionalDelete- 阻止无条件删除,特殊情况可通过传入Condition.TRUE跳过blockUnconditionalUpdate- 阻止无条件更新,特殊情况可通过传入Condition.TRUE跳过resultInitialCapacity- 集合查询结果(List|Set等)初始容量,建议对齐业务最小每页数量,可避免扩容,默认20resultInitialCapacityMax- 集合查询结果(List|Set等)初始容量最大值,建议对齐业务最大每页数量,可避免扩容,默认2000slowSqlThreshold- 慢sql阈值,执行耗时>=此阈值,则输出logenableSqlLog- 是否开启sql日志plainSqlLog- 是否输出明文Sql日志(需先开启日志)
@ConfigurationProperties(prefix="huiche")
public record HuicheProperties(EnumBy enumBy, Boolean nullToEmpty, Boolean useNational, Integer batchSize, boolean enableSerializationMapper, boolean blockUnconditionalDelete, boolean blockUnconditionalUpdate, int resultInitialCapacity, int resultInitialCapacityMax, Long slowSqlThreshold, boolean enableSqlLog, boolean plainSqlLog)
extends Record
huiche配置属性
- Author:
- Maning
-
Constructor Summary
ConstructorsConstructorDescriptionHuicheProperties(EnumBy enumBy, Boolean nullToEmpty, Boolean useNational, Integer batchSize, boolean enableSerializationMapper, boolean blockUnconditionalDelete, boolean blockUnconditionalUpdate, int resultInitialCapacity, int resultInitialCapacityMax, Long slowSqlThreshold, boolean enableSqlLog, boolean plainSqlLog) Creates an instance of aHuichePropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebatchSizerecord component.booleanReturns the value of theblockUnconditionalDeleterecord component.booleanReturns the value of theblockUnconditionalUpdaterecord component.booleanReturns the value of theenableSerializationMapperrecord component.booleanReturns the value of theenableSqlLogrecord component.enumBy()Returns the value of theenumByrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenullToEmptyrecord component.booleanReturns the value of theplainSqlLogrecord component.intReturns the value of theresultInitialCapacityrecord component.intReturns the value of theresultInitialCapacityMaxrecord component.Returns the value of theslowSqlThresholdrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuseNationalrecord component.
-
Constructor Details
-
HuicheProperties
public HuicheProperties(EnumBy enumBy, Boolean nullToEmpty, Boolean useNational, Integer batchSize, boolean enableSerializationMapper, boolean blockUnconditionalDelete, boolean blockUnconditionalUpdate, int resultInitialCapacity, int resultInitialCapacityMax, Long slowSqlThreshold, boolean enableSqlLog, boolean plainSqlLog) Creates an instance of aHuichePropertiesrecord class.- Parameters:
enumBy- the value for theenumByrecord componentnullToEmpty- the value for thenullToEmptyrecord componentuseNational- the value for theuseNationalrecord componentbatchSize- the value for thebatchSizerecord componentenableSerializationMapper- the value for theenableSerializationMapperrecord componentblockUnconditionalDelete- the value for theblockUnconditionalDeleterecord componentblockUnconditionalUpdate- the value for theblockUnconditionalUpdaterecord componentresultInitialCapacity- the value for theresultInitialCapacityrecord componentresultInitialCapacityMax- the value for theresultInitialCapacityMaxrecord componentslowSqlThreshold- the value for theslowSqlThresholdrecord componentenableSqlLog- the value for theenableSqlLogrecord componentplainSqlLog- the value for theplainSqlLogrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
enumBy
-
nullToEmpty
Returns the value of thenullToEmptyrecord component.- Returns:
- the value of the
nullToEmptyrecord component
-
useNational
Returns the value of theuseNationalrecord component.- Returns:
- the value of the
useNationalrecord component
-
batchSize
-
enableSerializationMapper
public boolean enableSerializationMapper()Returns the value of theenableSerializationMapperrecord component.- Returns:
- the value of the
enableSerializationMapperrecord component
-
blockUnconditionalDelete
public boolean blockUnconditionalDelete()Returns the value of theblockUnconditionalDeleterecord component.- Returns:
- the value of the
blockUnconditionalDeleterecord component
-
blockUnconditionalUpdate
public boolean blockUnconditionalUpdate()Returns the value of theblockUnconditionalUpdaterecord component.- Returns:
- the value of the
blockUnconditionalUpdaterecord component
-
resultInitialCapacity
public int resultInitialCapacity()Returns the value of theresultInitialCapacityrecord component.- Returns:
- the value of the
resultInitialCapacityrecord component
-
resultInitialCapacityMax
public int resultInitialCapacityMax()Returns the value of theresultInitialCapacityMaxrecord component.- Returns:
- the value of the
resultInitialCapacityMaxrecord component
-
slowSqlThreshold
Returns the value of theslowSqlThresholdrecord component.- Returns:
- the value of the
slowSqlThresholdrecord component
-
enableSqlLog
public boolean enableSqlLog()Returns the value of theenableSqlLogrecord component.- Returns:
- the value of the
enableSqlLogrecord component
-
plainSqlLog
public boolean plainSqlLog()Returns the value of theplainSqlLogrecord component.- Returns:
- the value of the
plainSqlLogrecord component
-