What's New?
For detailed version information, please refer to Github and Gitee. This section introduces the new features introduced in each milestone version.
V4 Version
New Features in v4.8 (v4.8.4)
Note
Starting from version v4.5, default support is for JDK17+. To maintain compatibility with JDK 8 ~ 16, you can use the compatibility version with the .jdk8 suffix, for example: v4.8.4.jdk8.
- Bean Searcher
- Optimized exception handling mechanism: when encountering unknown SQL syntax that cannot be processed, an exception is thrown to inform the user which part of the SQL cannot be parsed (since v4.8.1)
- Compatible with PgSQL's
||string concatenation operator (since v4.8.1) - Embedded parameter end flag supports square bracket detection (since v4.8.3)
- Fixed the issue where the SQL generated by the pagination query of
SqlServerDialectdid not meet the SQL Server syntax requirements when the user did not specify the sort field (since v4.8.3)
- Bean Searcher Exporter
- Added the
onlyIfattribute to theExportannotation for defining field export conditions, supporting expression syntax.- Supports referencing values from the search parameter map (
paraMap) using parameter names. - Supports
SpELexpression syntax in Spring environments. - Supports
SnELexpression syntax in Solon environments.
- Supports referencing values from the search parameter map (
- Added an export field resolution caching mechanism to the
ExportFieldResolvercomponent.- Introduced
ConcurrentHashMapto cache export field resolution results, improving performance. - Added the
clearCachemethod for manual cache clearing.
- Introduced
- Optimized the
ExportFieldcomponent: when a field value isnull, returns an empty string""and does not invoke the formatter (since v4.8.2).
- Added the
New Features in v4.7 (v4.7.1)
Note
Starting from version v4.5, default support is for JDK17+. To maintain compatibility with JDK 8 ~ 16, you can use the compatibility version with the .jdk8 suffix, for example: v4.7.1.jdk8.
- Bean Searcher
- Optimized the
paraMapparameter values forParamAware,ResultFilter, andSqlInterceptor: uses non-null values processed byParamFilter(since v4.7.1)
- Optimized the
- Bean Searcher Exporter
- The
BeanExportercomponent added support for a series of export methods with theFunction<List<T>, List<T>> mapperparameter, allowing secondary processing of the overall queried data before writing to the export file:export(String name, Class<T> beanClass, Function<List<T>, List<T>> mapper)export(String name, Class<T> beanClass, int batchSize, Function<List<T>, List<T>> mapper)export(String name, Class<T> beanClass, Map<String, Object> paraMap, Function<List<T>, List<T>> mapper)export(String name, Class<T> beanClass, Map<String, Object> paraMap, int batchSize, Function<List<T>, List<T>> mapper)export(FileWriter writer, Class<T> beanClass, Function<List<T>, List<T>> mapper)export(FileWriter writer, Class<T> beanClass, int batchSize, Function<List<T>, List<T>> mapper)export(FileWriter writer, Class<T> beanClass, Map<String, Object> paraMap, Function<List<T>, List<T>> mapper)export(FileWriter writer, Class<T> beanClass, Map<String, Object> paraMap, int batchSize, Function<List<T>, List<T>> mapper)
- The
New Features in v4.6 (v4.6.0)
Note
Starting from version v4.5, default support is for JDK17+. To maintain compatibility with JDK 8 ~ 16, you can use the compatibility version with the .jdk8 suffix, for example: v4.6.0.jdk8.
- Bean Searcher
- Added the
allowBoolLiterals(): booleanmethod definition to theDialectinterface, indicating whether the database supports boolean literals. - Added the
DialectSqlInterceptorcomponent to automatically convert boolean literals in user SQL to1and0when the database does not support them. - Added the
DaMengDialectdialect implementation for compatibility with the DaMeng database. - Added
StringFieldConvertor, which can convert JDBC-returned values of typesClob,Number,Boolean, andDatetoString(compatible with cases where the DaMeng database returnsClobforTEXTtype fields).
- Added the
- Bean Searcher Boot Starter
- Added the
bean-searcher.field-convertor.use-stringconfiguration item to control whether to enableStringFieldConvertor. Default istrue.
- Added the
- Bean Searcher Solon Plugin
- Added the
bean-searcher.field-convertor.use-stringconfiguration item to control whether to enableStringFieldConvertor. Default istrue.
- Added the
New Features in v4.5 (v4.5.2)
Note
Starting from version v4.5, default support is for JDK17+. To maintain compatibility with JDK 8 ~ 16, you can use the compatibility version with the .jdk8 suffix, for example: v4.5.2.jdk8.
- Bean Searcher
- Added
maxSizeandmaxOffsetattributes to the@SearchBeanannotation, allowing individual search classes to set their own risk control values, overriding global configurations. - Added an
extractmethod to thePageExtractorinterface, supporting the inclusion of aBeanMetaparameter. - Added the
groupRoot(String groupSeparator)method to the parameter builder, allowing ordinary parameter groups passed from the frontend to be added to the root group. - Added the
groupRoot()method to the parameter builder, which uses the default group separator to add ordinary parameter groups passed from the frontend to the root group. - Optimized
DefaultSqlExecutor: If SQL execution fails, the SQL log level is elevated fromDEBUGtoERROR(since v4.5.1). - Optimized
DefaultSqlExecutor: If JDBC fails at theprepareStatementstage, the problematic SQL is also printed (since v4.5.1). - Optimized
EnumFieldConvertor: to support conversion fromshortandbyteto enums. Previously, onlyStringandinttypes were supported (since v4.5.2).
- Added
- Bean Searcher Exporter (Initial Release: Data Export Module)
- Added the
Exportannotation to mark fields for export (supports expression-based value conversion). - Added the
BeanExporterexporter, making data export as simple as querying (supports real-time pagination export, immediate frontend response, and built-in concurrency control). - Added the
FileWriterinterface for extending export file types. The default implementationCsvFileWriterexports CSV files. - Customizable export filename decorator
FileNamer. - Customizable data batch loading delay strategy
DelayPolicy. The default uses a random inflation delay strategyDelayPolicy.RandomInflate. - And more...
- Added the
- Bean Searcher Boot Starter
- Added the
bean-searcher.exporter.batch-sizeconfiguration item: specifies the default number of records queried per batch during data export. Default is1000. - Added the
bean-searcher.exporter.batch-delayconfiguration item: initial delay time after each batch query, default 100 milliseconds, to reduce database pressure. Default is100ms. - Added the
bean-searcher.exporter.max-exporting-threadsconfiguration item: maximum number of concurrent exports. When the number of simultaneous exporters reaches this value (default10), new exporters will be in a waiting state. - Added the
bean-searcher.exporter.max-threadsconfiguration item: maximum thread count. When there are too many simultaneous exporters (default30), new exports will not be accepted (new exporters will receive a prompt to try later or an exception, with specific behavior determined byFileWriter). - Added the
bean-searcher.exporter.timestamp-filenameconfiguration item: whether to automatically append the current timestamp to the exported filename. Default istrue. - Added the
bean-searcher.exporter.too-many-requests-messageconfiguration item: the prompt message returned when there are too many exporters. Default is: "大人请息怒,当前导出数据的人实在太多了,请稍后再试一下子哈!"
- Added the
- Bean Searcher Solon Plugin
- Added the
bean-searcher.exporter.batch-sizeconfiguration item: specifies the default number of records queried per batch during data export. Default is1000. - Added the
bean-searcher.exporter.batch-delayconfiguration item: initial delay time after each batch query, default 100 milliseconds, to reduce database pressure. Default is100ms. - Added the
bean-searcher.exporter.max-exporting-threadsconfiguration item: maximum number of concurrent exports. When the number of simultaneous exporters reaches this value (default10), new exporters will be in a waiting state. - Added the
bean-searcher.exporter.max-threadsconfiguration item: maximum thread count. When there are too many simultaneous exporters (default30), new exports will not be accepted (new exporters will receive a prompt to try later or an exception, with specific behavior determined byFileWriter). - Added the
bean-searcher.exporter.timestamp-filenameconfiguration item: whether to automatically append the current timestamp to the exported filename. Default istrue. - Added the
bean-searcher.exporter.too-many-requests-messageconfiguration item: the prompt message returned when there are too many exporters. Default is: "大人请息怒,当前导出数据的人实在太多了,请稍后再试一下子哈!"
- Added the
New Features in v4.4 (v4.4.3)
- Bean Searcher
- Add
OracleTimestampFieldConvertor: for compatibility with theTIMESTAMPtype fields returned by theOracledriver. - Added
IndexArrayParamFilter: Supports parsing parameters in the formkey[0]=v1 & key[1]=v2. - Enhanced
SuffixOpParamFilter: Supports merging case-insensitive checks into a single parameter, e.g.,name-ct-ic=xxx. - Enhanced
MetaResolver: AddedclearCache()method to manually clear theBeanMetacache. - Enhanced
@DbIgnore: Supports annotating other custom annotations to inherit@DbIgnorefunctionality. - Added
AnnoUtils: For parsing composite annotations. - Enhanced
MapUtilsutility class (since v4.4.2)- Added
flat(Map<String, String[]> map, boolean urlDecode)method to support specifying whether to perform URL decoding - Added
flatBuilder(Map<String, String[]> map, boolean urlDecode)method to support specifying whether to perform URL decoding - The original
flat(Map<String, String[]> map)method now performs URL decoding by default - The original
flatBuilder(Map<String, String[]> map)method now performs URL decoding by default
- Added
- Optimized
EnumFieldConvertor: to support conversion fromshortandbyteto enums. Previously, onlyStringandinttypes were supported (since v4.4.3). - Optimized
DefaultSqlExecutor: If SQL execution fails, the SQL log level is elevated fromDEBUGtoERROR(since v4.4.3). - Optimized
DefaultSqlExecutor: If JDBC fails at theprepareStatementstage, the problematic SQL is also printed (since v4.4.3).
- Add
- Bean Searcher Label (First Release)
- Introduced
@LabelForannotation (inherits@DbIgnore) to label and resolve Label fields (e.g., markingstatusNameas the Label forstatus). - Added
LabelLoaderinterface for loading custom Labels. - Provided
EnumLabelLoaderimplementation for loading enum Labels. - Optimized
LabelLoaderinterface to ensure theidsparameter inload(key, ids)is non-empty (since v4.4.1). - Enhanced
@LabelForto support fields in parent and child classes (since v4.4.1).
- Introduced
- Bean Searcher Boot Starter
- Added configuration
bean-searcher.params.filter.use-oracle-timestampto enableOracleTimestampFieldConvertor(default:true). - Added configuration
bean-searcher.params.filter.use-index-arrayto enableIndexArrayParamFilter(default:false). - Added automated configuration for Bean Searcher Label.
- Added configuration
- Bean Searcher Solon Plugin
- Added configuration
bean-searcher.params.filter.use-oracle-timestampto enableOracleTimestampFieldConvertor(default:true). - Added configuration
bean-searcher.params.filter.use-index-arrayto enableIndexArrayParamFilter(default:false). - Added automated configuration for Bean Searcher Label.
- Added configuration
New Features in v4.3 (v4.3.6)
- Bean Searcher
- Optimized
BeanMeta: AddedgetSqlSnippets()to retrieve all parsed SQL snippets on an entity class. - Enhanced
SearchSql: AddedgetSearchParam()to access resolved search parameters inSqlInterceptor. - Enhanced
MapBuilder: Addedor(..)andand(..)for simplifying logical grouping. See issue. - Enhanced
MapBuilder: AddedbuildForRpc()andbuildForRpc(RpcNames)for building parameters for remote API calls. - Optimized
MapBuilder: Methodsfield(FieldFn, Collection)andfield(String, Collection)now acceptnullas the second parameter. - Enhanced
DefaultParamResolver: AddedgexprMergeto control merging/overriding group expressions. See issue. - Added
JoinParaSerializer: Serializes collection-type parameters into comma-separated strings. - Added
ArrayValueParamFilter: Compatible with array parameters likeage=20 & age=30 & age-op=bt. - Added
SuffixOpParamFilter: Simplifies parameters (e.g.,age-gt=25instead ofage=25 & age-op=gt). - Added
JsonArrayParamFilter: Simplifies parameters (e.g.,age=[20,30]instead ofage-0=20 & age-1=30). - Added
AlwaysTrue(at) andAlwaysFalse(af) operators. See issue. - Upgraded
OracleDialect: Usesoffset ? rows fetch next ? rows onlysyntax (requires Oracle 12c+). - Optimized
ExprParser: Logical operators&and|are no longer customizable. - Enhanced
DateTimeParamConvertor: Supports timestamp values (since v4.3.2). - Optimized
BeanMetato preserve field declaration order (since v4.3.3). - Fixed caching order in
DefaultGroupResolver(since v4.3.3). - Enhanced
DateParamConvertorto support multiple date formats (since v4.3.5). - Enhanced
DateTimeParamConvertorto support flexible datetime formats (since v4.3.5). - Fixed
EnumParamConvertorcompatibility with empty strings. - Upgraded Junit to 5.10.2.
- Optimized
- Bean Searcher Boot Starter
- Added configurations:
bean-searcher.params.group.mergeable,bean-searcher.params.filter.use-size-limit,bean-searcher.params.filter.use-array-value,bean-searcher.params.filter.use-suffix-op,bean-searcher.params.filter.use-json-array. - Added
SpringSqlExecutorfor Spring transaction support (since v4.3.2). - Added timezone configuration for
DateTimeParamConvertor(since v4.3.2).
- Added configurations:
- Bean Searcher Solon Plugin
- Added configurations similar to Boot Starter.
- Added
SolonSqlExecutorfor Solon transaction support (since v4.3.2). - Supports IDE configuration hints with Solon plugin (since v4.3.5).
Reference sections: Field Parameters, Logical Grouping, Parameter Filters, Embedded Parameters, Requesting Third-Party BS Services.
New Features in v4.2 (v4.2.9)
- Bean Searcher
- Added
DynamicDialectandDynamicDialectSupportfor dynamic dialects (v4.2.0). - Renamed
FieldParam.Value.isEmptyValue()toisEmpty()(v4.2.0). - Renamed
AbstractSearchertoBaseSearcher(v4.2.0). - Enhanced
DateTimeParamConvertorto parseyyyy-MM-dd HH:mm:ss.SSS,yyyy-MM, andyyyyformats (v4.2.0). - Added
EnumParamConvertorfor enum serialization (v4.2.1). - Enhanced
JsonFieldConvertorfor complex JSON array conversion (v4.2.6).
- Added
- Bean Searcher Boot Starter
- Added
bean-searcher.sql.dialect-dynamicto enable dynamic dialects (default:false). - Added
bean-searcher.params.fail-on-errorto control exception throwing (v4.2.3).
- Added
- Bean Searcher Solon Plugin
- Similar updates as Boot Starter.
New Features in v4.1 (v4.1.2)
- Bean Searcher
- Enhanced
@DbFieldwithname,cluster, andmapToattributes. - Added dynamic condition fields via
@SearchBean.fields. - Optimized logical expression simplification.
- Enhanced
- Bean Searcher Boot Starter
- Customizable
GroupPairResolvervia Bean injection.
- Customizable
- Bean Searcher Solon Plugin
- Initial Solon plugin release.
New Features in v4.0 (v4.0.2)
- Bean Searcher
- GroupId changed to
cn.zhxu. - Package renamed to
cn.zhxu.bs. - Added
timeoutproperty in@SearchBean. - Introduced JSON field support via
JsonFieldConvertor. - Enhanced
MapUtilswith convenient Map construction methods.
- GroupId changed to
- Bean Searcher Boot Starter
- Supports Spring Boot 3.
- Added configurations for JSON and List field conversion.
V3 Version
The version is too old, and the author is too lazy to translate it.
V2 Version
This version is too old; details are unavailable.
V1 Version
This version is too old; details are unavailable.
