自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 论manager层的必要性

当你有两个service,比方说一个叫做Aservice,一个叫做Bservice。1.此时在Aservice中你有一个方法叫做method-a,然后在Bservice中某一个方法method-b需要使用到method-a,此时你在Bservice中注入Aservice。2.此时在Aservice中有一个方法叫做method-aa,需要使用到Bservice中的某一个方法method-bb,此时你在Aservice中注入Bservice。然后当你运行的时候——报错!OK,大概的一

2022-05-23 18:43:35 987

原创 RabbitMq使用方法

1.RabbitMq运行机制2.交换机(Exchange) 类型direct(直接):消息精确发送,而且只能到达一个队列fanout(扇出):消息会分发到所有绑定的队列上。topic(主题):与fanout类似,但是多了个属性路由key绑定,消息会发送到路由key对应的队列上3.spring整合rabbitmq3.1 导入amqp依赖<dependency> <groupId>org.springframework.boot&l.

2022-05-23 18:40:24 818

原创 java线程池异步使用

1.原生的线程池对象(本人推荐使用这个)package d7_threadpool;import java.util.concurrent.*;/** public ThreadPoolExecutor(int corePoolSize,* int maximumPoolSize,* long keepAliveTime,* TimeUnit unit,* BlockingQueue<Runnable> workQueue,* ThreadFactory thre

2022-05-23 18:32:14 4364

原创 Spring Cache Redis配置

1.导入cache依赖包<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId></dependency>2.yml配置 选择Redis作为存储 cache: type: redis redis: #单位毫秒

2022-05-23 18:22:48 1121

原创 Redisson分布式锁

1.第一步导入redisson依赖<dependency> <groupId>org.redisson</groupId> <artifactId>redisson-spring-boot-starter</artifactId> <version>3.16.0</version></dependency>2.创建一个redisson的配置类RedissonConfig,内容如

2022-05-23 18:12:57 233

原创 Lambda简化条件语句(让代码更优雅)

1. LambdaQueryWrapper 条件查询List<ProductInfoEntity> productInfoList = productInfoMapper.selectList(new LambdaQueryWrapper<ProductInfoEntity>().eq(ProductInfoEntity::getId, id).eq(ProductInfoEntity::getState, 1));2. LambdaQueryChainWrapper

2022-05-23 17:57:25 753

原创 Canal 实现Mysql Redis数据同步

1.首先mysql数据库得开启binlog2.导入canal依赖 <!--Canal 依赖--> <dependency> <groupId>top.javatool</groupId> <artifactId>canal-spring-boot-starter</artifactId> <version>1.2.1-RELE

2022-05-12 01:01:45 1085 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除