摘要:
<dependency> <groupId>com.github.dozermapper</groupId> <artifactId>dozer-core</artifactId> <version>6.5.2</version> </dependency> pom文件 导入dozer相关的 依赖在 阅读全文
摘要:
pom: <dependency> <groupId>org.redisson</groupId> <artifactId>redisson</artifactId> <version>3.15.6</version> </dependency> 配置类 package com.aila.confi 阅读全文
摘要:
SET GLOBAL sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; SET SESS 阅读全文
摘要:
idea中创建多模块gradle项目通过compile project(':其他模块'),导入类时能找到,编译时找不到其他的类 原因:子模块需要增加 jar{ enabled = true } compile project 依赖引用其他工程 compile files 依赖第三方文件 depend 阅读全文
摘要:
public synchronized OrderBOResult addOrder(OrderParam orderParam) 一般来说这样加锁可以保证 同一时间只有一个线程能使用这个方法,但是如果这样做 直接导致了 一个多线程项目变成了 一个单线程项目 所有我们可以 用一个常量来保证只有相同S 阅读全文
摘要:
elasticSearch版本6.8.12 springboot版本2.2.7 springdataelasticSearch版本3.2.7 使用 ElasticsearchRepository 向elasticSearch 中添加 时间类型为LocaldateTime 的记录 entity pac 阅读全文
摘要:
redistemplate.opsForValue().increment("key",1);原子性+1 redisTemplate.opsForValue().setIfAbsent("key","value",timeout,unit); 分布式锁 保证在分布式环境一些 一段时间内 只有一台机械 阅读全文
摘要:
使用索引 并且 一个字段为Long 如果使用 字段=数字 的形式查询 是不会使用索引的 这也就是为什么 mybatis 和mybatis plus 会这么受欢迎的理由 因为他帮你做了 一些mysql 的优化 select * 可以换成select 你想要的字段 好像更明白mysql 了 阅读全文
摘要:
1.实现ApplicationContextAware接口 重写setApplicationContext 方法 添加@Component 注解 @Component public class VipSolverChooser implements ApplicationContextAware { 阅读全文
摘要:
闲来无事 把spring cloud gateway 文档看了一下 https://cloud.spring.io/spring-cloud-gateway/2.2.x/reference/html/ 文档地址 后续更新吧 看了一下的心得 迟早会代替zuul 成为新网关的 个人感觉 zuul 需要配 阅读全文