MySQL性能 最大数据量 抛开数据量和并发数,谈性能都是耍流氓。MySQL没有限制单表最大记录数,它取决于操作系统对文件大小的限制。 《阿里巴巴Java开发手册》提出单表行数超过500万行或者单表容量超过2GB,才推荐分库分表。性能由综合因素决定,抛开业务复杂度,影响程度依次是硬件配置、MySQL Read More
posted @ 2020-06-10 10:36 AlexZS Views(178) Comments(0) Diggs(0) Edit
<!-- 通用mapper依赖--> <!-- <dependency>--> <!-- <groupId>tk.mybatis</groupId>--> <!-- <artifactId>mapper-spring-boot-starter</artifactId>--> <!-- <versio Read More
posted @ 2020-05-27 10:23 AlexZS Views(155) Comments(0) Diggs(0) Edit
解决mybatis中的org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 1、一般的原因是Mapper interface和xml文件的定义对应不上,需要检查包名,namespace,函数名称 Read More
posted @ 2020-05-25 17:23 AlexZS Views(205) Comments(0) Diggs(0) Edit
JDK8 之前,Java 只提供一个 Date 类,平常我们需要将 Date 按照一定格式转化成字符串,我们需要使用 SimpleDateFormat。 SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm: Read More
posted @ 2020-05-14 11:12 AlexZS Views(440) Comments(0) Diggs(0) Edit
一、判断字符串是否为空 old: if (null == str || str.isEmpty()) { } 使用 StringUtils ,上面代码可以替换下面这样: if (StringUtils.isEmpty(str)) { } StringUtils 内部还有一个方法 isBlank,也是 Read More
posted @ 2020-05-14 10:55 AlexZS Views(374) Comments(0) Diggs(0) Edit
zk作为一款成熟的分布式协调框架,订阅-发布功能是很重要的一个。所谓订阅发布功能,其实说白了就是观察者模式。观察者会订阅一些感兴趣的主题,然后这些主题一旦变化了,就会自动通知到这些观察者。 zk的订阅发布也就是watch机制,是一个轻量级的设计。因为它采用了一种推拉结合的模式。一旦服务端感知主题变了 Read More
posted @ 2020-05-06 15:17 AlexZS Views(1231) Comments(0) Diggs(0) Edit
管理权限原理及应用1、为什么要使用权限 1.1 安全性:误操作、人为破坏、数据泄露等等。 1.2 数据隔离:不同的权限能看到及操作不同的数据 1.3 明确职责:运营、客服等不同角色,leader和dev等不同级别 2、怎么去实现去权限框架(三个手段,1、自定义,2、使用shiro,3、使用sprin Read More
posted @ 2020-04-30 16:45 AlexZS Views(1581) Comments(0) Diggs(0) Edit
java 操作zookeeper: 先贴上java连接zookeeper代码 public class zookeeperConnection { final static CountDownLatch connectedSignal = new CountDownLatch(1); static Read More
posted @ 2020-04-27 17:35 AlexZS Views(1465) Comments(0) Diggs(0) Edit
在项目开发过程中经常遇到时间处理,但是你真的用对了吗,理解阿里巴巴开发手册中禁用static修饰SimpleDateFormat吗? 为什么需要LocalDate、LocalTime、LocalDateTime? 1.Date如果不格式化,打印出的日期可读性差 Tue Sep 10 09:34:04 Read More
posted @ 2020-04-22 11:02 AlexZS Views(3145) Comments(0) Diggs(0) Edit
一、zookeeper /ˈzuːkiːpə(r)/ 介绍 它是一个分布式服务框架,是Apache Hadoop 的一个子项目,它主要是用来解决分布式应用中经常遇到的一些数据管理问题,如:统一命名服务、状态同步服务、集群管理、分布式应用配置项的管理等。ZooKeeper包含一个简单的原语集,提供Ja Read More
posted @ 2020-04-21 19:23 AlexZS Views(2410) Comments(0) Diggs(0) Edit