1 Star 5 Fork 3

fhs_opensource/vite_press_easy_trans

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
trans-sett.md 548 Bytes
一键复制 编辑 原始数据 按行查看 历史
wanglei 提交于 2年前 . 初次提交

说明

比如userController 的 list接口和info接口都复用了UserVo,UserVo中包含A,B 2个字段需要翻译。
list接口只需要A字段的翻译结果,不需要翻译B字段,info接口需要翻译A,B 2个字段。

TransSett注解

@TransSett(exclude = {"B"},include = {"A"}) 加到controller方法上即可。
exclude和include配置一个就可以了。exclude是排除哪些字段,剩下的字段都翻译,include是只翻译哪几个,其他的不翻译。
如果2个属性都配置了,以include为准。

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/fhs-opensource/vite_press_easy_trans.git
git@gitee.com:fhs-opensource/vite_press_easy_trans.git
fhs-opensource
vite_press_easy_trans
vite_press_easy_trans
master

搜索帮助