摘要: 先引入jar 包 <dependency> <groupId>org.springframework.retry</groupId> <artifactId>spring-retry</artifactId> </dependency> <dependency> <groupId>org.aspec 阅读全文
posted @ 2021-03-16 23:38 lyj98 阅读(281) 评论(0) 推荐(0)
摘要: Guava Retry具有更强的灵活性,可以根据返回值校验来判断是否需要进行重试 首先是pom 文件 <dependency> <groupId>com.github.rholder</groupId> <artifactId>guava-retrying</artifactId> <version 阅读全文
posted @ 2021-03-16 23:34 lyj98 阅读(381) 评论(0) 推荐(0)
摘要: 1、创建Maven工程 添加pom依赖,pom.xml代码如下 复制代码 4.0.0 com.sun.elasticsearch Elasticsearch01 0.0.1-SNAPSHOT org.elasticsearch.client transport 5.5.2 junit junit 4 阅读全文
posted @ 2021-01-25 19:09 lyj98 阅读(55) 评论(0) 推荐(0)
摘要: 生产者 KafkaExtendProducer.send("topic","key","value"); 消费者 @Slf4j @RequiredArgsConstructor @Component public class ConsumerThread implements Runnable { 阅读全文
posted @ 2021-01-14 13:45 lyj98 阅读(63) 评论(0) 推荐(0)
摘要: ![](https://img2020.cnblogs.com/blog/2205885/202012/2205885-20201202154952616-141207507.png) 阅读全文
posted @ 2020-12-02 15:50 lyj98 阅读(237) 评论(0) 推荐(0)
摘要: 在实体类中 ID属性加注解 @TableId(type = IdType.AUTO) 主键自增 数据库中需要设置主键自增 private Long id; @TableId(type = IdType.NONE) 默认 跟随全局策略走 private Long id; @TableId(type = 阅读全文
posted @ 2020-12-02 11:28 lyj98 阅读(655) 评论(0) 推荐(0)
摘要: 实现HandlerInterceptor接口 重写里边的prehandler ,posthandler,afterCompletion方法 preHandle中验证是否包含配置的url,setStart(System.currentTimeMillis())初始时间 用对象保存一下 TimeThre 阅读全文
posted @ 2020-11-07 18:34 lyj98 阅读(59) 评论(0) 推荐(0)