006. Thread-safe JAVA lock correlation
1. The concept of locks in JAVA
Spin Lock: When a thread acquires a lock, if the lock has already been acquired by another thread, the thread will wait in a loop and constantly determine if the lock can be acquired successfully until it is acquired.
Optimistic lock: If there is no conflict, read the latest data when modifying the data and ...
Posted by JakesSA on Sun, 05 Apr 2020 02:55:32 +0200
Gateway filter batch release url specified by properties -- white list
White list
2.4.1 what is a white list
Problem: all requests are blocked and do not meet the actual requirements. (some requests do not need to be intercepted)
White list: used to store the request path that does not need to be blocked
2.4.3 implementation
Step 1: modify the gateway yml file, and configure the path that does not need to be b ...
Posted by gijs25 on Fri, 03 Apr 2020 07:00:38 +0200
Java multithreaded programming (8) - concurrent access: static synchronization method and synchronized code block
This series of blog is mainly practical, and it doesn't introduce the long winded things. The content mainly comes from the book "Java multithreaded programming core technology"
The keyword synchronized can also be applied to static static methods. If it is written in this way, the Class class corresponding to th ...
Posted by akki85 on Thu, 02 Apr 2020 23:54:35 +0200
[Linq] common grammar summary
Language integrated query (LINQ), which integrates query syntax in C programming language, can access different data sources with the same syntax. LINQ provides the abstraction layer of different data sources, so the same syntax can be used.
public class Book
{
public int Id { get; set; }
/// <summary>
/// Title
/// </ ...
Posted by saurabhdutta on Thu, 02 Apr 2020 01:24:19 +0200
BeanUtils tool class of java object-oriented programming 3
BeanUtils
1, Introduction & Overview & Introduction
BeanUtils make it easier and faster to encapsulate JavaBean data.
For example, it can be used in band parameter construction, Set method, reflection.
Getting started:
Import jar package:
public static void main(String[] args) throws Exception {
//Populating Phone obje ...
Posted by jami3 on Wed, 01 Apr 2020 21:54:40 +0200
Object oriented design of python function
Understand object-oriented design through several functional numbering evolution
def01.py
1 dog1 = {
2 'name':'Yuan Hao',
3 'gender':'mother',
4 'type':'Tibetan Mastiff'
5 }
6 dog2 = {
7 'name':'Lee Lee',
8 'gender':'common',
9 'type':'Sausage'
10 }
11
12 def jiao(dog):
13 print('A dog[%s],Wang Wang'%dog[' ...
Posted by lance1208 on Wed, 01 Apr 2020 00:28:24 +0200
The principle analysis and render function of building virtual DOM with VUE
To write HTML structure through VUE, tempplate attribute is generally recommended, which is easy to use. The specific code is as follows:
Example 1: use template to render ul list
var vm = new Vue({
el:"#demo1",
template:`
<ul class = "bg" style = "fontSize:20px" abc = "yyy">
<li ...
Posted by dragonfly4 on Tue, 31 Mar 2020 10:52:09 +0200
[SpringBoot MQ Series] Introduction to basic usage posture of RabbitListener
[MQ Series] Introduction to basic use posture of RabbitListener
The message sending posture of rabbitmq was introduced before. Since there is sending, there must be consumers. In the spring boot environment, consumption is relatively simple. With @ RabbitListener annotation, you can basically meet more than 90% of your business development n ...
Posted by karnegyhall on Mon, 30 Mar 2020 15:05:00 +0200
Detailed explanation of PHP FFI -- a new PHP extension method
With PHP7.4, there is an extension that I think is very useful: PHP FFI (Foreign Function interface), which refers to a description in PHP FFI RFC:
For PHP, FFI provides a way to write PHP extensions and bindings to C libraries in pure PHP.
Yes, FFI provides high-level languages to call each other directly. For PH ...
Posted by Johan Beijar on Mon, 30 Mar 2020 12:07:14 +0200
Restful API Interface Security Design
1.API Interface Design Specification
https://github.com/mishe/blog/issues/129
2. Security Design
a. Whitelist restrictions
Accept only the request response from a specific system, the caller's IP address needs to be reported in the system, otherwise it cannot be invoked
b. Validation of legitimate identity
Basic Authentication: This ...
Posted by OM2 on Sat, 28 Mar 2020 09:05:09 +0100