refactor!: 1.0.0 瘦身为 field-translate 汇率插件 (Boot 3) - #7
Merged
Conversation
核心变更: - 新增 translate 包:TranslateField 注解、FieldTranslator 接口、 TranslateContext/Holder、TranslateStrategy(通用对象图遍历) - 新增 ExchangeFieldTranslator:将汇率转换封装为 FieldTranslator 插件 - 新增 DictFieldTranslator + IDictDataProvider:字典翻译插件实现 - 新增 TranslateAppendingBeanSerializer:统一序列化器,同时读取 AutoExchangeContext 和 TranslateContext - 新增 TranslateContextContributor SPI:各插件通过此接口贡献上下文属性 - 新增 TranslateResponse 注解 + TranslateAspect:纯通用翻译触发点 - 新增 auto-exchange-spring-boot-openapi 模块:OperationCustomizer 自动 增强 Swagger 文档 - 更新 AutoExchangeAutoConfiguration:注册所有新组件 - AutoExchangeAspect 同时触发旧有汇率转换和新通用翻译策略 向后兼容: - 旧注解 @AutoExchangeField、@AutoExchangeResponse 完全保留 - 所有现有测试用例继续通过(6→8 个测试) Co-authored-by: Juwencheng <juwencheng@users.noreply.github.com>
…er 为废弃 引导用户迁移到新的统一 TranslateBeanSerializerModifier 和 TranslateAppendingBeanSerializer,后者同时支持 AutoExchangeContext 和 TranslateContext。 Co-authored-by: Juwencheng <juwencheng@users.noreply.github.com>
Co-authored-by: Juwencheng <juwencheng@users.noreply.github.com>
- TranslateCacheStore / TranslateCacheStrategy SPI - 默认 InMemoryTranslateCacheStore,字典 1h / 汇率结果 1d - @TranslateField 新增 cacheStrategy 属性 - TranslateCacheManager 在翻译链路中统一读写缓存 - 更新 README 缓存策略说明 Co-authored-by: Juwencheng <juwencheng@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- 升级 Spring Boot 3.3.7 / Java 17,版本 1.0.0-SNAPSHOT - 依赖 field-translate-starter,移除 translate 核心与旧双轨代码 - 删除 processor 模块,ExchangeFieldTranslator 作为插件自动装配 - 迁移 test-app 至 @TranslateField + @TranslateResponse - openapi 适配 springdoc 2.x BREAKING CHANGE: 移除 @AutoExchangeField/@AutoExchangeResponse 等旧 API Co-authored-by: Cursor <cursoragent@cursor.com>
- 新增 maven-ci(构建前安装 field-translate) - SNAPSHOT 推 main 自动 deploy,Release 触发正式版发布 - 新增 deploy profile,javadoc doclint 关闭 Co-authored-by: Cursor <cursoragent@cursor.com>
juwencheng
marked this pull request as ready for review
July 12, 2026 12:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
auto-exchange瘦身为汇率插件,依赖field-translate-starter@AutoExchangeField、AutoExchangeAspect、processor 模块等)迁移对照 (0.3.x → 1.0.0)
@EnableAutoExchange@EnableFieldTranslate@AutoExchangeResponse@TranslateResponse@AutoExchangeField@TranslateField(translator = ExchangeFieldTranslator.class)@AutoExchangeBaseCurrency@ExchangeBaseCurrencyfield-translate-dict模块Test plan
mvn test全部通过(9 tests)