• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






五色风车

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 2 3 4 5 6 7 ··· 18 下一页

2020年9月10日

sharding jdbc(二) 分库分表
摘要: 基于SpringBoot+Mybaits+sharding jdbc 由于sharding-jdbc是不支持动态进行建库的SQL,那么就需要一次把需要的数据库和数据表都建好 数据库脚本: SET FOREIGN_KEY_CHECKS=0; -- -- Table structure for t_or 阅读全文
posted @ 2020-09-10 15:56 五色风车 阅读(233) 评论(0) 推荐(0)
 

2020年9月7日

zookeeper的ZAB算法
摘要: ZAB(ZooKeeper Atomic Broadcast)是为ZooKeeper设计的一种支持崩溃恢复的原子广播协议。 ZAB和Paxos最大的不同是,ZAB主要是为分布式主备系统设计的,而Paxos的实现是一致性状态机(state machine replication) 尽管ZAB不是Pax 阅读全文
posted @ 2020-09-07 19:02 五色风车 阅读(272) 评论(0) 推荐(0)
 

2020年9月2日

Rocketmq
摘要: 一、 MQ背景&选型 消息队列作为高并发系统的核心组件之一,能够帮助业务系统解构提升开发效率和系统稳定性。主要具有以下优势: 削峰填谷(主要解决瞬时写压力大于应用服务能力导致消息丢失、系统奔溃等问题) 系统解耦(解决不同重要程度、不同能力级别系统之间依赖导致一死全死) 提升性能(当存在一对多调用时, 阅读全文
posted @ 2020-09-02 16:49 五色风车 阅读(138) 评论(0) 推荐(0)
 
RabbitMQ
摘要: 什么叫消息队列 消息(Message)是指在应用间传送的数据。消息可以非常简单,比如只包含文本字符串,也可以更复杂,可能包含嵌入对象。 消息队列(Message Queue)是一种应用间的通信方式,消息发送后可以立即返回,由消息系统来确保消息的可靠传递。消息发布者只管把消息发布到 MQ 中而不用管谁 阅读全文
posted @ 2020-09-02 16:12 五色风车 阅读(201) 评论(0) 推荐(0)
 
BeanPostProcessor 与 ApplicationContextAware
摘要: 在bean 实例化时,进行某种操作,可以继承`BeanPostProcessor`,缺点是每创建一个bean都会执行 postProcessBeforeInitialization()和postProcessAfterInitialization() 方法 @Service public class 阅读全文
posted @ 2020-09-02 14:07 五色风车 阅读(796) 评论(0) 推荐(0)
 

2020年8月28日

fastjson 指定系列化格式
摘要: public static void main(String[] args) { List<User> list = new ArrayList<>(); list.add(new User(1,"11","11")); list.add(new User(2,"22","22")); list.a 阅读全文
posted @ 2020-08-28 13:59 五色风车 阅读(948) 评论(0) 推荐(0)
 

2020年8月25日

Collectors 类
摘要: 利用java8新特性,可以用简洁高效的代码来实现一些数据处理。 定义1个Apple对象: public class Apple { private Integer id; private String name; private BigDecimal money; private Integer n 阅读全文
posted @ 2020-08-25 15:05 五色风车 阅读(228) 评论(0) 推荐(0)
 
@Qualifier 注解指定装备特定的bean
摘要: public interface TestService { String test(); } @Service("aTestService") public class ATestServiceImpl implements TestService{ @Override public String 阅读全文
posted @ 2020-08-25 14:16 五色风车 阅读(438) 评论(0) 推荐(0)
 

2020年8月21日

Java中的finally 和return
摘要: 直接上代码 public static int a(){ int i = 1; try{ i++; return ++i; }catch(Exception e){ }finally { if(i > 1){ System.out.println(" i = " + i);// i = 3 } } 阅读全文
posted @ 2020-08-21 14:11 五色风车 阅读(448) 评论(0) 推荐(0)
 
String hashCode 方法为什么选择数字31作为乘子
摘要: String hashCode 的实现方法 public int hashCode() { int h = hash; if (h == 0 && value.length > 0) { char val[] = value; for (int i = 0; i < value.length; i+ 阅读全文
posted @ 2020-08-21 10:04 五色风车 阅读(154) 评论(0) 推荐(0)
 
上一页 1 2 3 4 5 6 7 ··· 18 下一页