Custom blog skinVIP only

*Blog header:

The format is PNG and JPG, the width * height is greater than 1920 * 100 pixels, not more than 2MB, the main visual suggestion is placed on the right, please refer to the online blog header

Please upload pictures larger than 1920 * 100 pixels!

Blog basemap:

The picture format is PNG and JPG, no more than 1MB, and can be tiled up, down, left and right to the whole background

Column diagram:

The picture format is PNG and JPG, and the picture width * height is 300 * 38 pixels, no more than 0.5Mb

Main title color:

RGB color, for example: #afaf

Hover:

RGB color, for example: #afaf

Subtitle color:

RGB color, for example: #afaf

Custom blog skin

-+

xzh_ blog

Oh ~ slowly clear

  • Blog (222)
  • Resources (6)
  • Collection
  • follow
Sort:
By last release time
By visits
RSS subscription

original The cron tool obtains the last execution time and the next execution time

Spring's cronsequencegenerator tool does not support 7-bit cron expressions, nor does it support expressions with non numeric "L": illegalargumentexception: cron expression must consider of 6 fields (found 7 in "34 20 18 L 1 / 3? *") numberformatexception: for input string: "L" later, a tool was found on GitHub: GitHub - jmrozanec / cron UTI

2021-09-13 09:47:45 sixty-one four

original Java most complete configuration. Gitignore file ignore rules

# Compiled class file*.class# Log file*.log# BlueJ files*.ctxt# Mobile Tools for Java (J2ME).mtj.tmp/# Package Files*.jar*.war*.nar*.ear*.zip*.tar.gz*.rar# Eclipse & IntelliJ IDEA.classpath.settings/.idea.idea/*.iws*.iml*.i.

2021-08-12 10:02:30 two hundred and twenty-seven one

original Beanutils.copyproperties ignore exceptions and null values

import lombok.extern.slf4j.Slf4j; import org.springframework.util.ClassUtils; import java.beans.PropertyDescriptor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.Arrays; import java.util.List;/** * @ Author Xiang Zhenhua *

2021-08-11 15:10:19 one hundred and two four

original Spring cloud gateway uses current limiter

1. Introduce reactive redis Maven coordinates <-- redis--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis-reactive</artifactId> </dep

2021-08-10 11:42:07 two hundred and eighty-five five

original Java ignores the warning annotation @ suppresswarnings

//Ignore all types of warnings @ suppresswarnings ("all") / / ignore unchecked conversions. For example, @ suppresswarnings ("unchecked") / / ignore warnings of unused variables @ suppresswarnings ("unused") / / ignore warnings related to the use of closeable type resources @ suppresswarnings ("resource") / / ignore warnings in the class path, Warning @ suppresswarning for nonexistent path in original file path

2021-08-04 15:44:47 two hundred and sixteen seven

original Redis high availability architecture design and common problem analysis

Redis is very simple to use. You can go online easily by installing and configuring it. There will be no problems in a short time. However, with the passage of time, redis instances increase and client calls are complicated. Real problems begin to appear, and the whole relationship becomes very chaotic. From the perspective of use, redis needs to be managed like an application service. Let's take a look at a common dialogue in the daily development process: Development: why can't redis access it? Operation and maintenance: just now the server memory was broken, and the server automatically restarted. Development: why is redis delayed for so long? Operation and maintenance: brother, don't put tens of thousands of data in Zset. The consequences of inserting and sorting are very serious! Development: what about the key written in? Why is it missing? transport

2021-07-29 11:57:02 two thousand and ten thirteen

original Core competencies of Architects

When making analysis or thinking summary, the structured thinking method is generally adopted: · first, sort out the objectives and clarify the relationship between the objectives and current or future development. Secondly, analyze the current situation, know what is missing, the gap between the current situation and the goal, and what is the primary task at present. The next step is the analysis of routes and measures, and the formulation of schemes that can ensure effective implementation. Finally, we are determined to practice with high executive power

2021-06-19 10:45:06 three hundred and sixty-three nineteen

original MySQL joint index usage analysis thoroughly finds out under what circumstances the index will be used

1. Create table ` t_ demo` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `a` varchar(15) DEFAULT NULL, `b` varchar(15) DEFAULT NULL, `c` varchar(15) DEFAULT NULL, `d` varchar(15) DEFAULT NULL, PRIMARY KEY (`id`), KEY `INDEX_A_B_C` (`a`,`b`,`c`

2021-05-19 14:42:47 two thousand two hundred and fifty-five one hundred and thirty-two

original Five principles of architecture design solid five principles of design

SRP: the principle of single responsibility is easily mistaken for that a software module should only do one thing, which is actually inaccurate. The accurate description of the principle of single responsibility should be that a software module should only be responsible for one kind of behavior. If multiple projects with different characteristics depend on the same underlying interface at the same time, as long as any project needs to change the underlying interface logic , it will affect other projects. The single responsibility principle mainly discusses the relationship between functions and classes, but it has different forms at two levels. At the component level, it is called the common closure principle; at the software architecture level, it is used to lay the change axis of the architecture boundary. OCP: the opening and closing principle. A good software design should be easy to expand and resist modification. The opening and closing principle is the main principle The aim is to make

2021-05-18 17:23:06 one thousand nine hundred and sixty-one ten

original Can locking ensure thread safety?

This question is only asked in the interview. This question can't simply answer whether or not. All interview questions can't simply answer whether or not. Instead, we should explain the reasons clearly in order to achieve the purpose of the interview. To answer this question, we must first find out what is line safety. In the JMM memory model, there are the concepts of main memory and working memory, and threads are sensitive to data The operation of is to read the data from the main memory to the working memory of the current thread, and then brush it to the main memory after modification. This process may lead to wrong operations due to the data in the local working memory of another thread not being updated in time, which is a thread safety problem. In short, thread safety refers to the correct operation of shared data in a multi-threaded environment. How to ensure General thread safety certificate

2021-05-17 17:42:16 eight hundred and sixty-one nineteen

original What does MyISAM read? The correct pronunciation of MyISAM

MyISAM is a storage engine of MySQL. Its pronunciation is [Mai] ˈ zæm]

2021-05-17 16:25:33 one thousand one hundred and fifteen three

original Gitflow specification git submission process scheme

Scheme 1: resident branch: mapping relationship between development, master iterative development, testing and deployment process online bug repair process branch and environment scheme 2: resident branch: mapping relationship between development, test, UAT, master iterative development, testing and deployment process online bug repair process branch and environment

2021-05-17 11:27:39 two hundred and twenty-four eight

original The alicloud OSS upload file tool class is used directly

Preparation: find the O & M to create a storage bucket and obtain the account information endpoint, accesskeyid and secretaccesskey. Note: the size of the uploaded file should not exceed 5GB, and then import the Alibaba OSS SDK coordinates <! -- OSS -- > < dependency > < groupid > com.aliyun.oss < / groupid > < artifactid > aliyun SDK oss&l

2021-05-13 15:04:44 two hundred and ninety-one nine

original Database cross database join scheme

It's better not to have cross database joins, which should be avoided during design. Put the tables that need to be joined in the same database, even if they are divided into databases and tables, to see if they can be divided together according to the same dimension. Or see if redundant fields can be set to avoid associated queries. If cross database joins cannot be avoided, microservice API queries should also be used, or middleware should be used. Cross database joins must be used, MySQL can also be supported: 1. Start the federated engine, modify the my.ini (or my. CNF) file, add a new row with the content of Federated, and then restart mysql. 2. Create a remote table in the database through the parameter connection ='mysql

2021-05-13 10:41:50 one thousand and fifty-four five

original Is zookeeper strongly consistent

Zookeeper is weak consistency, which can ensure the final consistency. However, it can also support strong consistency. It needs to be synchronized with the leader node through the sync() method to ensure that the current node data is consistent with the leader.

2021-05-12 16:21:59 two hundred and fifty-two four

original Wechat applet to obtain mobile phone number

1. To obtain the mobile phone number bound by wechat users, you need to call the wx.login interface to obtain the code. 2. Because the user needs to trigger actively to initiate the acquisition of the mobile phone number interface, this function is not called by the API, but needs to be triggered by clicking the button component to obtain encrypteddata and IV< button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"></button>Page({ getPhoneNumber (e) { console.log(e

2021-05-12 14:11:44 two hundred and fifty-eight seven

original Two steps to log in wechat applet to obtain openid and session_key

1. The front end calls Wx. Login() to obtain the temporary login certificate code and return it to the background service. Wx. Login ({success (RES) {if (res.code) {/ / initiate a network request Wx. Request ({URL: ' https://example.com/onLogin ', data: { code: res.code } }) } else { console..

2021-05-11 14:09:01 two hundred and sixty-one three

original Kafka has two configuration file modes

1. YML configuration file (simple configuration) spring: Kafka: bootstrap servers: IP: Port consumer: group ID: group test enable auto commit: true auto commit interval: 1000ms auto offset reset: latest key deserializer: org.apache.kafka.common.seria

2021-05-10 17:27:02 one thousand four hundred and sixty-three six

original There are so many load balancing algorithms!!! Summary of load balancing algorithms

Load balancing algorithms can be divided into two categories: static load balancing algorithms and dynamic load balancing algorithms. In addition, you can customize load balancing algorithms. Static load balancing algorithm round robin: the server receives requests in a circular manner in order. Random: randomly select a server to accept the request. Ratio: assign a weight value to each server and allocate the request according to the weight. Hash (hash): access the corresponding server according to the hash value of the client IP. Consistent hash: client requests with the same IP are always sent to the same server. Dynamic load balancing algorithm minimum connections (leas)

2021-04-27 16:27:54 one thousand three hundred and three forty-four

original Two step multi tenant solution with mybatisplus

1. Define an implementation class of tenantlinehandler: import com.baidu.mybatisplus.extension.plugins.handler.tenantlinehandler; import com.google.common.collect.lists; import net.sf.jsqlparser.expression.expression; import net.sf.jsqlparser.expression.longvalue; import Java

2021-04-26 15:30:33 one thousand one hundred and thirty-nine seventeen

original Domain model naming conventions: POJO, dto, VO, Bo, Po, do

POJO (plain ordinary Java object) simple java object is a general term for dto / VO / Bo / PO / do. Dto (data transfer object) data transfer object refers to data transfer between different services or service layers, such as RPC interface parameters and controller layer request parameters. VO (value object, view object) Value objects, display objects, and value objects returned to the front end, such as the response parameters of the controller layer. Bo (business object) business objects may contain data from multiple tables

2021-04-26 10:16:49 three hundred and forty-one four

original Package XXX does not exist cannot find symbol

When deploying services on Linux, a large number of packages are thrown and exceptions are not found [error] / home / Jenkins / agent / workspace / pipeline_p-h6sbk-4 / SRC / main / Java / COM / userserviceimpl. Java: [3,28] package com.alibaba.fastjson does not exist [error] / home / Jenkins / agent / workspace / pipeline_p-h6sbk-4 / SRC / main / Java / COM / user.ja

2021-04-25 09:47:49 one thousand two hundred and fifty-two five

original Java converts excel into list set or JSON, exports excel file to local, imports and exports excel, and easyexcel tool class

Introduce Maven <! -- fastjson -- > < dependency > < groupid > com. Alibaba < / groupid > < factid > fastjson < / factid > < version > 1.2.76 < / version > < / dependency & gt

2021-04-22 14:42:18 three hundred and thirty-three ten

original Double write consistency scheme

What is double writing the same data? You need to write to the database and write to the cache. Double writing is difficult to ensure strong consistency, which can ensure the final consistency. To achieve strong consistency, you need to serialize all read and write requests with queues, but the performance is very poor, reducing the QPS of the system. Without a perfect scheme, there will be inconsistency when using the cache, which needs to be weighed according to the specific business Select the appropriate business scheme. Update the database first, and then delete the cache (recommended scheme) The probability of data inconsistency in this scheme is relatively low and the implementation is simple. The situation of data inconsistency: when the cache just fails, one thread queries the database to get the old value. After another thread updates the database and deletes the cache, the thread holding the old value in front will store the data in the cache, resulting in data inconsistency

2021-04-20 14:19:27 five hundred and thirteen five

original Redis transaction mechanism

Redis transactions are very weak, and cannot guarantee atomicity, and do not support rollback. Redis uses multi, exec, discard, and watch commands to implement transaction functions. Redis transactions are a collection of commands. All commands in a transaction are serialized, queued, and executed sequentially, and will not be interrupted during transaction execution. There are three steps to use redis transactions: start a transaction (multi) Order to join the team Execute transaction (exec) / cancel transaction (discard) watch is implemented through CAS to monitor a key. If the monitored key is modified by other clients, exec will give up all commands in the transaction queue. Watch can only be used in

2021-04-19 08:53:13 four hundred and fifty-nine six

original Design patterns in spring source code

Engineering pattern: the beanfactory in spring is the embodiment of the simple factory pattern. The bean object is obtained by passing in a unique ID. Singleton mode: Spring dependency injection bean instances are singleton by default. Spring dependency injection (including lazy init mode) takes place in getBean of abstractbeanfactory. The dogetbean method of getBean calls getsingleton to create beans. Decorator Pattern: the wrapper pattern used in spring has two manifestations in the class name: one is that the class name contains wrapper, and the other is that the class name contains Decorato

2021-04-18 11:42:02 two hundred and twenty-four three

original String splicing is still using string and StringBuilder? Try stringjoiner

Stringjoiner is a new class in JDK1.8. It is used to add separators, prefixes and suffixes when splicing strings. It does not need to manually splice these symbols that are irrelevant to business, and it also saves the trouble of dealing with boundary problems. Examples of instructions: splicing elements in an array into strings divided by "," string [] strings = new string [] {"a", "B", "C"} STR splicing result: A, B, C public static void main (string [] args) {string [] before using stringjoiner

2021-04-16 11:08:40 six hundred and eighty-six four

original Detailed explanation of seven parameters of java thread pool: number of core threads, maximum number of threads, idle thread survival time, time unit, work queue, thread factory and rejection policy

Source code introduction ThreadPoolExecutor is a thread pool implementation in JDK. This class implements various methods required for a thread pool, including task submission, thread management, monitoring, etc. take a look at the source code of the construction method of ThreadPoolExecutor class. Other methods for creating thread pools will eventually lead to this construction method. There are 7 parameters: corepoolsize and maximumpools Size, keepalivetime, unit, workqueue, threadfactory and handler. These seven parameters will be explained below. Public ThreadPool

2021-04-11 22:28:48 four thousand eight hundred and forty-six thirty-nine

original How does concurrenthashmap ensure thread safety

In jdk1.7, the segmented lock technology is essentially used to store key value pairs in the form of array + linked list. In order to improve concurrency, the original whole table is divided into n segments. As a whole, it is an array composed of segments. In each segment, there is an array composed of hashentries, and a linked list can be formed between each hashentry. We can A Segment as like as two peas HashMap, its internal structure is exactly the same as HashMap. When Segment is locked, it will not affect other Segment's reading and writing, and reduce the competition of lock. J

2021-04-09 13:42:10 one thousand and five hundred seven

original Why is HashMap thread unsafe

In jdk1.7, the put method of HashMap adopts the head insertion method. When resizing, a ring linked list will be formed, resulting in an endless loop. When resizing, it may also cause data loss. In JDK1.8, HashMap changes the put method to the tail insertion method, which will not form an endless loop, but will cause data coverage

2021-04-09 11:08:48 three hundred and twenty-one one

original Execution process of an update statement in MySQL (Figure)

2021-04-08 14:00:28 four hundred and thirteen seven

original Principle of redisson distributed lock lock renewal watchdog deadlock problem

When redis lock is used, there will be problems that the business is not completed and the lock expires. Redisson lock can be used to solve them. There are two modes for redisson locks. 1. A lock with a fixed validity period: the lock is automatically released after the validity period leasetime is exceeded. public void lock(long leaseTime, TimeUnit unit) { try { this.lockInterruptibly(leaseTime, unit); } catch (InterruptedException var

2021-04-08 13:42:30 one thousand one hundred and forty-nine two

original Consistent Hashing

The purpose of consistent hashing is to solve the problem of dynamic scaling of hashing algorithm, so as to minimize data synchronization during capacity expansion. The consistent hashing algorithm maps the whole hash value space into a virtual ring, and the value range of the whole hash space is 0 ~ 2 ^ 32-1. The whole space is organized clockwise. 0 ~ 2 ^ 32-1 coincides in the zero point. Next, use the following algorithm Map the service request, use the hash algorithm to calculate the corresponding hash value of the service request, and then search clockwise along the ring according to the position of the hash value. The first server encountered is the corresponding request processing server. When a new server is added, the affected data is only the server from the newly added server to the previous server in its ring space (i.e. counterclockwise)

2021-04-08 11:06:57 two hundred and twenty-eight one

original Spring security oauth2 login with SMS verification code

By inheriting org.springframework.security.oauth2.provider.token.abstracttokengranter, define grant_type = SMS and rewrite getoauthauthentication (clientdetails client, tokenrequest, tokenrequest), you can refer to org.springframework.security.oauth2.provider.password.resourceownerpasswordtoken

2021-04-06 11:41:25 four hundred and ten three

original Zero copy technology

DMA (direct memory access) direct memory access technology: during the data transmission of I / O equipment and memory, all the data handling work is handed over to the DMA controller, and the CPU is no longer involved in anything related to data handling, so that the CPU can handle other transactions. Zero copy : copy the data on the disk to the kernel buffer through DMA, and then transfer the buffer descriptor and data length to the socket buffer. The sg-dma controller of the network card will directly copy the data in the kernel buffer to the buffer of the network card. The file transfer method of zero copy technology reduces 2 times compared with the traditional file transfer method

2021-04-06 11:08:03 two hundred and forty-eight

original Internet Slang encyclopedia latest vocabulary slang generator

Two word verb double disk enabling precipitation forced landing series collaborative anti compatible packaging reorganization performance day should quantify force layout linkage subdivision combing output accelerate co construction support integration alignment benchmarking focusing grab disassembly pull through abstract exploration refining get through eat through migration distribution layers

2021-04-02 15:04:48 three thousand two hundred and sixty-seven one

original Tomcat defaults to the maximum number of threads, waiting queue length, and connection timeout

By default, the maximum number of threads supported by Tomcat is 200. When the number of threads reaches 200, new threads will be added to the waiting queue. The waiting queue defaults to 100. When the waiting queue reaches 100, the request will be rejected directly and returned to connectionrejected. The default connection timeout is 20 seconds. Here comes the official document of Tomcat http://tomcat.apache.org/tomcat-7.0-doc/config/http.htmlAttribute Description acceptCount The maximum queue length for inc.

2021-04-02 10:18:41 seven hundred and seventy-two

original Push failed Unable to access ‘ https://github.com/ ‘: Failed to connect to github.com port 443: Timed

An error is reported when GitHub is pushed to the remote warehouse: Push failed Unable to access ' https://github.com/ ': Failed to connect to github.com port 443: Timed out Solution: find GitHub login credentials in the credential manager of the control panel and modify the account password. You can also quickly open the CMD window and enter: rundll32.exe keymgr.dll, krshowkeymgr

2021-04-01 16:37:13 three hundred and twenty-seven

original Eureka implementation principle and self-protection mechanism are briefly introduced

Eureka is a service registration and discovery component developed in Java language based on restful API, which is open source by Netflix. Eureka follows the AP principle. Currently, Eureka is only open source to version 1. X, and version 2. X has announced that it is closed. Eureka adopts the server / client model for design: server plays the role of service registration center, provides service registration and discovery functions for clients, and maintains Relevant information of the client registered to itself, and provide an interface for the client to obtain the information of other services in the registry. The client registers the information about its own service on the server in a certain way,

2021-03-31 15:30:28 two hundred and fifty

original Basic concept and implementation principle of consult

Consul is developed by hashicorp based on go language. It is used for service governance under microservices. The raft algorithm is used to ensure the consistency of services. The design of master-slave mode can be expanded horizontally. RPC calls (HTTP and DNS) are used between clusters The main features of consul include service discovery, health check, key / value storage, secure service communication, and multi data centers. Consul's application scenarios include service discovery, service isolation, and service configuration

2021-03-31 11:55:43 one thousand eight hundred and forty-five thirteen

Jdk11 download the official 64 bit version jdk-11.0.10_windows-x64_bin.exe

Thank you for downloading this version of Java ™ Platform standard development kit (JDK) ™)。 JDK is a development environment for building applications and components using the Java programming language.

2021-04-07

Git download the official 64 bit version of windows git-2.31.1-64-bit.exe

Git is a free open source distributed version control system designed to handle all content from small to large projects quickly and efficiently.

2021-04-07

SecureCRT 9.0 download 64 bit scrt-sfx-9.0.0.2430

SecureCRT is a terminal emulator that supports SSH (ssh1 and SSH2) and telnet and rlogin protocols.

2021-04-07

MySQL 5.7 download 64 bit mysql-5.7.20-winx64 installation free

Mysql database service is a fully hosted database service used to deploy cloud native applications

2021-04-07

Sublimetext4 Download

Sublime text – sexy code editor and a necessary artifact for programmers! Sublime text is a powerful code editor and an advanced text editor for HTML and prose.

2021-04-07

JDK1.8 download the official 64 bit version jdk-8u191-windows-x64.exe

Thank you for downloading this version of Java ™ Platform standard development kit (JDK) ™)。 JDK is a development environment for building applications and components using the Java programming language.

2021-04-07

absolutely empty

absolutely empty

Favorites created by TATA favorite

People concerned by TATA fans

Tips
Are you sure you want to delete the current article?
cancel delete