2.0.0 (2023-08-06)
2.0.0 (2023-08-06)
这是 2.0.0
的正式版本,相对最近的一个正式版本 1.2.0
做了大幅度的重构,优化了很多旧功能,并且添加了较多新特性。
具体内容参见:[Milestone](https://github.com/opengoofy/crane4j/milestone/4)。
Feature
- 优化
@ContainerMethod
注解在类上的配置方式; - 添加一个全局的排序器静态单例,用于同时支持 Spring 的
@Order
与 Crane4j 的Sorted
接口; ConstantContainer
支持刷新缓存内容;- [代理填充方法支持设置临时容器](https://github.com/opengoofy/crane4j/issues/49);
- [提供一个默认的可配置容器注册者实现](https://github.com/opengoofy/crane4j/issues/41);
- [当在注解中不指定 key 属性时,允许将当前对象作为 key 值](https://github.com/opengoofy/crane4j/issues/100);
ReflectivePropertyOperator
在没有找到 setter 或者 getter 方法时,应当支持直接基于属性进行读写;- [支持“字典类型-字典项编码”模式的字典项填充](https://github.com/opengoofy/crane4j/issues/122);
Refactor
- [2.0 升级重构计划](https://github.com/opengoofy/crane4j/issues/86);
- [重构容器与装配操作配置的绑定过程](https://github.com/opengoofy/crane4j/issues/85);
- [重构全局配置类的容器管理功能](https://github.com/opengoofy/crane4j/issues/81);
- [装配操作可以指定数据源容器的加载策略](https://github.com/opengoofy/crane4j/issues/63);
- [配置解析器应当支持所有的AnnotatedElement类型对象的注解配置](https://github.com/opengoofy/crane4j/issues/45);
- 移除了
AbstractCacheablePropertyOperator
,缓存功能分离至独立的CacheablePropertyOperator
装饰器; - [在各个组件中由于参数/逻辑校验不通过而抛出异常时,异常需要更详细的信息](https://github.com/opengoofy/crane4j/issues/116);
- [一些关键操作通过 debug 级别的日志输出执行时间](https://github.com/opengoofy/crane4j/issues/107);
Fix
- 为基于
ConstantContainer
的枚举、常量容器提供独立的Builder
; - [启用全局切面后,springboot 项目启动报错](https://github.com/opengoofy/crane4j/issues/113);
- 在方法添加
@AutoOperate
后,若方法不指定填充对象类型,且返回值为空时报错; - spring环境下,
ContainerProvider
没有在启动后自动注册到Crane4jApplicationContext
中;
Doc