自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Beaver

HTTP2 ======>>. HTTP/3 || K8S

  • 博客(502)
  • 资源 (38)
  • 论坛 (1)
  • 收藏
  • 关注

原创 经常逛的IT博客--持续更新ing.......

微信公众号:http://mysql.taobao.org/monthly/https://saurzcode.in//https://dzone.comhttps://microservices.io/index.htmlhttps://hackernoon.com/@javinpaulhttps://enterpri...

2015-06-05 21:02:14 2098

原创 记录:mysql 批量更新的使用问题,rewriteBatchedStatements

目录一、场景二、问题原因一、场景最近在清洗老数据,为了提高效率,使用了mysql的batch特性:设置关闭自动提交功能:autoCommit = false示例代码:List<Person> persons = ... // get a list of Person objects from somewhere.String sql = "update people set firstname=? , lastname=? where id=...

2020-11-08 23:20:18 37

原创 Java Memory Model

https://courses.cs.ut.ee/MTAT.03.279/2016_fall/uploads/Main/7-threads-jmm.pdfhttps://github.com/sdcuike/issueBlog/blob/master/7-threads-jmm%20(1).pdfhttps://docs.oracle.com/javase/specs/jls/se7/html/jls-17.htmlhttps://shipi...

2020-07-11 22:57:36 99

原创 android 7.0以上charles https抓包

由于Android7.0之后新版本系统的安全限制,证书必须安装到系统证书目录下:/system/etc/security/cacerts,之前的安装的证书的步骤可能会抓包产生下图问题:Android7.0 之后默认不信任用户添加到系统的CA证书,按之前的步骤即使你在手机上安装了抓包工具的证书也无法抓取 https 请求,但是苹果系统目前还是可以安装的。操作步骤:1、系统首...

2020-04-23 23:18:53 5300

原创 Hystrix的使用

Hystrix虽然已经停止更新迭代,进入了维护阶段,替代品Resilience4j成为了首先,但是遗留系统还有必要维护更新的。Hystrix在项目中经常使用的方式主要有三种方式在;1、继承HystrixCommand实现代理类,把之前的业务逻辑写在run()方法内代码示例详见:https://github.com/Netflix/Hystrix/wiki/How-To-Use...

2020-04-12 22:08:05 216

原创 jvm指令monitorenter,monitorexit与synchronization关键字

monitorenter与monitorexit指令主要和java并发关键字synchronization 在jvm层指令的实现有关系。synchronization 方法的实现并没有采用这两个指令。monitorenter主要是获取监视器锁,monitorexit主要是释放监视器锁。monitorenterOperationEnter monitor for objec...

2020-02-26 00:59:15 2148

原创 构建容器的最佳做法

本文介绍构建容器的一系列最佳做法。这些做法涵盖了广泛的目标(从缩短构建时间到创建更小、弹性更佳的映像),旨在使容器更加容易构建(例如,使用Cloud Build),并且更加容易在Google Kubernetes Engine (GKE)中运行。这些最佳做法的重要性并不相同。例如,成功运行某一生产工作负载可能无需其中某些做法,但必须使用其他做法。特别是,与安全相关的最佳做法的重要性较为主...

2020-02-23 17:30:15 250

原创 A few distributed abstractions and primitives from Kubernetes

ContainersContainersare the building blocks for Kubernetes-based cloud-native applications. If we make a comparison with OOP and Java, container images are like classes, and containers are like obj...

2020-02-23 16:53:39 220

原创 Kubernetes Patterns-Distributed Primitives(k8s模式-分布式原语)

To explain what we mean by new abstractions and primitives, here we compare them with thewell-known object-oriented programming (OOP), and Java specifically. In the OOP universe, wehave concepts suc...

2020-02-23 15:53:24 292

原创 java之Compiler control

Controlling Java Virtual Machine (JVM) compilers might seem like an unnecessary task,but for many developers, this is an important aspect of testing. This is accomplished withmethod-dependent compil...

2020-02-07 20:41:45 221

原创 浏览器响应数据long型超长自动转换精度丢失-JavaScript 整数精度丢失问题-springboot解决Long类型数据传入前端损失精度

最近在洗敏感数据id,用类似snowflake算法加入分表基因生成新的ID,返回给前端,前端整数显示不正常。java中long的最大值:9223372036854775807看看在浏览器中的显示:Google Chrome版本 79.0.3945.117(正式版本) (64 位)后面好几位不一样了,看看JavaScript中整数的最大值:看来JavaScrip...

2020-01-18 00:26:39 1308

原创 基因分库分表

场景: 数据存储中,相互关系的表,尽量分库时落到同一个库中,避免遍历多个库查询,而且还能避免分布式事务。 一般分库或者分表我们采用取余操作,余数相同的id落到相同的库中,或分表规则一致。解决理论:参考:https://stackoverflow.com/questions/6670715/mod-of-power-2-on-bitwise-operators根据理...

2020-01-17 23:56:30 925

原创 边车设计模式-Sidecar pattern

Sidecar pattern Sidecar pattern和哈雷车类似原理:把一个应用的不同组件部署到不同的进程或容器中,以提供隔离和封装,应用的各个组件各自维护更...

2019-12-19 23:46:22 1124

原创 性能优化之写时复制(Copy-on-write:COW)

写入时复制(英语:Copy-on-write,简称COW)是一种计算机程序设计领域的优化策略。其核心思想是,如果有多个调用者(callers)同时请求相同资源(如内存或磁盘上的数据存储),他们会共同获取相同的指针指向相同的资源,直到某个调用者试图修改资源的内容时,系统才会真正复制一份专用副本(private copy)给该调用者,而其他调用者所见到的最初的资源仍然保持不变。这过程对其他的调用者都...

2019-12-15 21:51:22 2171 1

原创 Maven: Transitive Dependencies

Dependencies declared in your project’s pom.xml file often have their own dependencies . Such dependencies are called transitive dependencies . Take the example of Hibernate Core. For it to function p...

2019-11-30 18:28:57 144

原创 spring boot 目录浏览功能 How to enable directory listing in Spring Boot

@Componentpublic class CustomizationBean implements WebServerFactoryCustomizer<TomcatServletWebServerFactory> { @Override public void customize(TomcatServletWebServerFactory factory) {...

2019-11-29 14:05:50 458 1

原创 java9新特性-Stack Walking-当前线程栈信息

java语言是基于栈的设计语言,其执行的本质与c、c++语言一样,程序的运行都是一系列进栈出栈操作。JVM中的每个线程启动时都有一个私有的JVM线程栈会创建。栈这种数据结构就是我们常谈到的数据结构中的栈-后进先出的数据结构。栈保存了一系列栈帧,每当一个方法执行时都会伴随着新的栈帧的创建并进栈顶,方法执行完也都会伴随着对应的栈帧的销毁-出栈操作。有关具体细节可以参考https://docs.orac...

2019-10-26 23:49:22 128

原创 java9新特性-增强的try-with-resources块

java7新增了自动关闭资源的特性,碰到异常的时候,我们不必再写一堆啰嗦的处理代码,而是简洁的如下: try (ServerSocket socket = new ServerSocket(8090)) { System.out.println(socket); }或者多个资源的情况下: try (ServerSocket socket = ...

2019-10-22 01:08:37 200

原创 java10新特性:本地变量(local variable)-var类型推断

本地变量(local variable)-var类型推断,一种java语法糖,编译器根据代码上下文信息--字面量值、方法调用、声明等,推断变量类型,并且把类型信息添加到对应的生成的字节码里。先来个例子:public class TypeInference { public static void main(String[] args) { var time = L...

2019-10-19 20:06:51 1959

原创 Spring MVC @JsonView使用详解

@JsonView jackson注解官方文档:public @interface JsonViewAnnotation used for indicating view(s) that the property that is defined by method or field annotated is part of.An example annotation would be:...

2019-10-13 11:07:31 652 1

原创 java非静态内部类中的属性this$0

Effective java 第三版第24条:Item 24: Favor static member classes over nonstatic优选考虑使用静态成员类静态成员类是最简单的一种嵌套类。和普通的外层类一样,只是碰巧被声明在另一个类的内部而已,而且还带有点特殊技能:可以访问外层类的所有成员(包括私有的)。非静态成员类的每个实例都隐含着与外层类的一个外层类实例(在jdk...

2019-10-07 22:51:26 1164

原创 聊聊JVM Young Gen(年轻代)Eden区的线程本地分配缓冲区-TLAB(Thread Local Allocation Buffer)

JVM一般采用分代来管理堆内存,如下图: 逻辑上是连续的,但不同的gc回收算法在实际分配内存时不一定是连续的。一般大部分对象都在年轻代中的Eden区创建,除个别大对象直接在老年代分配。因为堆是共享的,多个线程可以同时创建对象,为了保证线程安全,Eden区又被分配成一个个线程本地分配缓冲区-TL...

2019-10-03 16:55:18 571

原创 java 泛型参数具体类型获取、泛型返回具体类型获取

自从java支持泛型后,现在,spring生态中的框架及目前的应用都使用了泛型。有的框架如mybatis和spring都需要反射获取类型,以使得序列化和反序列化得以实现,但有时候我们根据项目的需要获取这些具体类型。比如,mybatis orm环境下,数据库字段类型和java类型不匹配检测的功能,需要利用这种方法获取类中方法的具体类型,结合com.mysql.cj.MysqlType枚举中类型...

2019-09-30 17:28:00 6471

原创 数据源组件druid filter的扩展机制及spring boot 环境下的几种配置方式

Druid的监控统计功能是通过filter-chain扩展实现,filter给开发者带来了很好的扩展性,使得我们可以自定义实现一些功能。在spring boot环境下,除了系统环境变量及jdbc url方式配置filter,大多常用的有以下几种:(1)在项目中像平时写类加注解的方式例如:@Componentpublic class DemoFilter exte...

2019-08-25 20:33:37 1375 1

原创 spring 容器中Bean的生命周期图谱

The Spring application context uses the Factory method design pattern tocreate Spring beans in the container in the correct order according to thegiven configuration. So the Spring container has the...

2019-08-11 19:50:14 131

原创 java并发之synchronized解密

目录synchronized关键字主要用在4个地方:1.实例方法2.静态方法3.实例方法中的代码块4.静态方法中的代码块监视器锁(monitor lock)所属的对象是不同的JVM内部如何实现的(1)实例方法中的代码块和静态方法中的代码块通过指令monitorenter和monitorexit实现的(2)实例方法和静态方法JVM特殊处理,并没有相应的JVM...

2019-07-21 20:09:07 232

原创 java开发规则:线程如何被创建

目录1、创建线程请使用线程工厂类(1)自定义线程工厂参照java.util.concurrent.Executors类中的线程工厂(2)建议使用org.apache.commons.lang3.concurrent.BasicThreadFactoryapache lang3 工具包已经提供了一个自定义线程的工厂类,所以,我们放心的使用吧。2、设置线程的UncaughtEx...

2019-07-21 00:09:29 121

转载 Why you should avoid conditional statements

Developers tend to use a lot of conditional statements in their code. Of course, each flow has one specific path, its own specific validations, etc. It is very natural that your code has a lot of deci...

2019-05-16 14:08:39 139

转载 8 design patterns that every developer should know

8 design patterns that every developer should knowAs a developer, you are constantlyresolving problems. Many of these problems probably werealready solved by other developers, so, why do w...

2019-05-15 23:35:07 134

转载 Cloud Design Patterns

目录 Cloud Design Patterns1. Availability patterns(1) Health Endpoint Monitoring pattern(2)Queue-Based Load Leveling pattern(3)Throttling pattern 2.Da...

2019-05-14 22:06:35 201

转载 Ten design principles

Ten design principles目录 Ten design principlesDesign for self healing RecommendationsMake all things redundantR...

2019-05-05 21:17:17 383

转载 Architecture styles

Architecture styles目录 Architecture stylesA quick tour of the stylesN-tierWeb-Queue-WorkerMicroservicesCQRSEvent...

2019-05-05 19:59:50 312

转载 Go’s Philosophy on Concurrency

Go’s Philosophy on ConcurrencyCSP was and is a large part of what Go was designed around; however, Go also sup‐ports more traditional means of writing concurrent code through ...

2019-04-30 17:45:37 140

转载 5 great programming techniques every developer should know

5 great programming techniques every developer should know1 – Encapsulate ifs inside their methods, not outside them:Bad example:? 1 2 3 4 5 6 7 8 9 ...

2019-04-29 16:30:21 94

转载 11 mistakes java developers make when using exceptions

11 mistakes java developers make when using exceptionsThe problem: If you use Exceptions in the wrong way, bugs will be very difficult to find. If you always use generic Exceptions, how can oth...

2019-04-29 16:23:13 123

原创 Kafka消费积压Lag值Python代码获取

Kafka消费积压Lag值Python代码获取 背景 根据kafka的消息堆积情况,自动扩容消费者集群实例数目。 代码及测试from kafka import KafkaConsumerfrom kafka import KafkaProducerfrom kafka import To...

2019-04-24 10:56:15 2365

原创 Software Architecture Patterns:Microkernel Architecture

目录 Software Architecture Patterns:Microkernel ArchitectureBase design principlePattern DescriptionPattern ExamplesConsiderationsPattern AnalysisOverall agilityEase of deployment...

2019-04-21 22:06:59 428

原创 Software Architecture Patterns: Layered Architecture

目录 Software Architecture Patterns: Layered ArchitecturePattern DescriptionKey ConceptsPattern ExampleConsiderationsPattern AnalysisOverall agilityEase of deploymentTestabilityPe...

2019-04-21 19:01:36 454

原创 java中的4个级别的引用类型

java中提供了4个级别的引用,即强引用、软引用、弱引用、虚引用。 强引用(Strong Reference):在程序中普遍存在的,普通系统99%以上都是强引用。平时我们用关键字new 出来的对象都是强引用。 例如 Foo firstReference = new Foo();Foo secondReference = firstReference;...

2019-03-16 21:55:26 639

原创 RocketMQ 同一JVM实例启动多个不同NameServer 对应的Producer导致NameServer只连上一个的问题

          现在对原业务RocketMQ的NameServer连接方式更改,之前业务方写的NameServer地址列表,现在我们架构组为了维护统一更改成域名的形式,而且涉及到迁移新RocketMQ集群,同时保留生产者向新老RocketMQ集群发送消息,发送的比例由配置中心控制。所以对其业务方项目的生产者必须提供连接新老NameServer的两个生产者,业务方初始化生产者的代码不变,只是初始...

2018-10-18 01:33:42 4255

The.Kubernetes.Book.2020.9.epub

The.Kubernetes.Book.2020.9.epub

2020-12-26

Design.and.Build.Great.Web.APIs.2020.10.zip

Design.and.Build.Great.Web.APIs.2020.10

2020-12-26

Effective.C.2020.8.zip

Effective.C.2020.8.zip

2021-01-02

Docker.Deep.Dive.2020.5.zip

Docker.Deep.Dive.2020.5

2021-01-02

Docker.Deep.Dive.2020.5.txt

Docker.Deep.Dive.2020.5.txt

2021-01-02

Advanced MySQL 8 1st Edition.Pdf

Advanced MySQL 8 1st Edition.Pdf

2020-03-23

Learn Docker - Fundamentals of Docker 18.x 2018.pdf.zip

Learn Docker - Fundamentals of Docker 18.x 2018.pdf.zip Learn Docker - Fundamentals of Docker 18.x 2018.pdf.zip Learn Docker - Fundamentals of Docker 18.x 2018.pdf.zip Learn Docker - Fundamentals of Docker 18.x 2018.pdf.zip

2020-02-08

逆流而上 阿里巴巴技术成长之路.pdf.zip

逆流而上 阿里巴巴技术成长之路.pdf.zip 逆流而上 阿里巴巴技术成长之路.pdf.zip 逆流而上 阿里巴巴技术成长之路.pdf.zip

2020-02-08

Packt.Mastering.Kubernetes.1788999789.rar

Mastering.Kubernetes

2020-02-07

Introducing Maven, 2nd Edition.epub

Introducing Maven, 2nd Edition.epub Introducing Maven, 2nd Edition.epub Introducing Maven, 2nd Edition.epub

2019-11-30

Java 9 Revealed.pdf.zip

Java 9 Revealed.pdf.zip

2019-10-27

Packt.Design.Patterns.and.Best.Practices.in.Java.9.1786463598.epub.zip

Packt.Design.Patterns.and.Best.Practices.in.Java.9.1786463598 Packt.Design.Patterns.and.Best.Practices.in.Java.9.1786463598

2019-09-07

Packt.Mastering.Java.9.1786468735.zip

Packt.Mastering.Java.9 Packt.Mastering.Java.9 Packt.Mastering.Java.9

2019-09-07

Java 9 Dependency Injection - Nilang Patel.pdf.zip

Java 9 Dependency Injection - Nilang Patel Java 9 Dependency Injection - Nilang Patel Java 9 Dependency Injection - Nilang Patel

2019-09-07

Spring 5 Recipes A Problem-Solution Approach.zip

Spring 5 Recipes A Problem-Solution Approach

2019-09-03

Syngress.SQL.Injection.Attacks.and.Defense.2nd.Edition.1597499633.zip

Syngress.SQL.Injection.Attacks.and.Defense.2nd.Edition.1597499633

2019-08-31

Syngress.SQL.Injection.Attacks.and.Defense.2nd.Edition.1597499633.epub

Syngress.SQL.Injection.Attacks.and.Defense.2nd.Edition.1597499633

2019-08-31

Syngress.SQL.Injection.Attacks.and.Defense.2nd.Edition.1597499633.mobi

Syngress.SQL.Injection.Attacks.and.Defense.2nd.Edition.1597499633

2019-08-31

How Software Works.pdf.zip

How Software Works How Software Works How Software Works

2019-08-24

Composing.Software.2019.2.mobi

Composing.Software.2019.2

2019-07-18

Composing.Software.2019.2.epub

Composing.Software.2019.2

2019-07-18

Composing.Software.2019.2.pdf

Composing.Software.2019.2

2019-07-18

Rapid Java Persistence and Microservices.epub

Rapid Java Persistence and Microservices;Rapid Java Persistence and Microservices

2019-07-14

micro-service-architect.pdf

微服务架构;微服务架构;微服务架构;微服务架构;微服务架构;

2019-07-14

OCP Java SE 8 Programmer II Exam Guide.pdf

OCP Java SE 8 Programmer II Exam Guide;OCP Java SE 8 Programmer II Exam Guide

2019-07-14

Learn Java 12 Programming.epub

Learn Java 12 Programming;Learn Java 12 Programming;Learn Java 12 Programming

2019-07-13

What's New in Java 12.pdf

What's New in Java 12;What's New in Java 12;What's New in Java 12;What's New in Java 12

2019-07-13

Scala for Java Developers

Scala for Java Developers. Scala for Java Developers

2018-04-07

Social Network-Based Recommender Systems

Social Network-Based Recommender Systems Social Network-Based Recommender Systems

2018-04-07

Beginning C++17

Beginning C++17 Beginning C++17 Beginning C++17 Beginning C++17

2018-04-07

Bitter_Java_by_Bruce_Tate

Bitter_Java_by_Bruce_Tate Bitter_Java_by_Bruce_Tate

2018-02-04

The Robert C. Martin Clean Code Collection.

The Robert C. Martin Clean Code Collection. The Robert C. Martin Clean Code Collection.

2018-02-03

Pro.JPA.2.in.Java.EE.8.An.In-Depth.Guide.to.Java.Persistence.APIs.3rd.Edition.

Apress.Pro.JPA.2.in.Java.EE.8.An.In-Depth.Guide.to.Java.Persistence.APIs.3rd.Edition.

2018-02-03

Hadoop Explained.pdf )

Hadoop Explained.pdf Hadoop Explained.pdf ) Hadoop Explained.pdf )

2018-02-03

Java Deep Learning Essentials.epub

Java Deep Learning Essentials.epub Java Deep Learning Essentials.epub

2018-02-03

Mastering Microservices with Java.pdf

Mastering Microservices with Java.pdf Mastering Microservices with Java.pdf

2018-02-03

Mastering Microservices with Java.mob

Mastering Microservices with Java.mob Mastering Microservices with Java.mob

2018-02-03

esper官方文档

esper官方文档,最新5.20.学习cep的开源实现

2015-06-20

A_Beaver的留言板

发表于 2020-01-02 最后回复 2020-01-02

空空如也

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

TA关注的人 TA的粉丝

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