内容简介:Easy_Trans 1.0.4 更新说明 A 修复@TransMethodResult 泛型支持bug B 添加JPA支持 2.Easy Trans简介 easy trans是一个springboot的字典/外键 翻译组件,可以不用表关联查询 根据字典码 外键翻译 字典描述 和title...
- Easy_Trans 1.0.4 更新说明
A 修复@TransMethodResult 泛型支持bug
B 添加JPA支持
2.Easy Trans简介
easy trans是一个springboot的字典/外键 翻译组件,可以不用表关联查询 根据字典码 外键翻译 字典描述 和title/name 等信息,使用效果和方法如下图:
3、Easy Trans集成
EasyTrans支持 进程缓存翻译,redis缓存翻译,动态查表三种方式,集成步骤如下:
1 、先把maven 引用加上
<dependency> <groupId>com.fhs-opensource</groupId> <artifactId>easy-trans-spring-boot-starter</artifactId> <version>1.0.4</version> </dependency>
2 、如果是Mybatis Plus 需加以下扩展
<dependency>
<groupId>com.fhs-opensource</groupId>
<artifactId>easy_trans_mybatis_plus_extend</artifactId>
<version>1.0.4</version>
</dependency>
3 、JPA 用户需加以下扩展:
<dependency>
<groupId>com.fhs-opensource</groupId>
<artifactId>easy_trans_jpa_extend</artifactId>
<version>1.0.4</version>
</dependency>
4、如果使用 Redis 换存翻译请添加redis的引用(如果之前加过了请不要重复添加)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
5、在yaml中添加如下配置
easy-trans: autotrans: #您的service/mapper 所在的包 支持通配符比如com.*.**.service.**,他的默认值是com.*.*.service.impl package: com.fhs.test.service.**; com.fhs.test.mapper.**; #启用redis缓存 is-enable-redis: true spring: redis: host: 192.168.0.213 port: 6379 password: 123456 database: 0 timeout: 6000
6、如果不使用redis,请在启动类加禁用掉redis的自动配置类
@SpringBootApplication(exclude = { RedisAutoConfiguration.class })
4. 传送门
源码和其他高级特性使用教程 https://gitee.com/fhs-opensource/easy_trans
集成demo:https://gitee.com/fhs-opensource/easy_trans_springboot_demo
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
The Linux Command Line
William E. Shotts Jr. / No Starch Press, Incorporated / 2012-1-17 / USD 39.95
You've experienced the shiny, point-and-click surface of your Linux computer-now dive below and explore its depths with the power of the command line. The Linux Command Line takes you from your very ......一起来看看 《The Linux Command Line》 这本书的介绍吧!
在线进制转换器
各进制数互转换器
HEX CMYK 转换工具
HEX CMYK 互转工具
