Tag:java

  • Implementation principle of preventing repeated requests and submitting forms in Java background

    Time:2021-5-8

    This article mainly introduces the implementation principle of Java background to prevent the client from repeating requests and submitting forms. The example code is introduced in great detail, which has a certain reference learning value for everyone’s study or work. If you need a friend, you can refer to it preface In the web / […]

  • Analysis of Java 9 optional API new method

    Time:2021-5-1

    This paper introduces the new method of Java 9 optional API. In addition to modularity, Java 9 also adds three methods to the optional class. 1. Or method Sometimes when optional is empty, we want to execute some other logic and return optional as well. Before java9, the optional class had only orelse() and orelseget() […]

  • Java Multithread concurrent programming and lock principle analysis

    Time:2021-4-30

    This article mainly introduces the Java multithreading concurrent programming and lock principle analysis, the article through the example code introduction is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to 1、 Preface Recently, the project has encountered the situation of multithreading concurrency (concurrent order grabbing & […]

  • Java singleton mode (hungry man mode and lazy man mode)

    Time:2021-4-30

    Java singleton mode A single example of starving Han style For the hungry man pattern, we can understand it as follows: the singleton class is very hungry and needs to eat urgently, so it creates an object immediately when the class is loaded. Lazy singleton class For the lazy mode, we can understand it as […]

  • Atomic principle of Java Memory Model and example analysis

    Time:2021-4-29

    This article mainly introduces the atomic principle of Java Memory Model and example analysis. The example code introduced in this article is very detailed, which has a certain reference learning value for everyone’s study or work. Friends in need can refer to it In this paper, we will talk about how JMM ensures the atomicity […]

  • Java wrapper class cache mechanism principle example explanation

    Time:2021-4-28

    This article mainly introduces the caching mechanism principle of Java wrapper class, and explains the examples in detail. Through the example code, this article introduces it in great detail, which has a certain reference learning value for everyone’s study or work. Friends who need it can refer to it The caching mechanism of Java wrapper […]

  • Process instance analysis of an object in Java NEW

    Time:2021-4-26

    This article mainly introduces the Java new process of an object instance analysis, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to When Java is creating an object, it will first check whether the class to which the object […]

  • Java implementation of file monitor FileMonitor instance code

    Time:2021-4-24

    Application scenarios: The code can realize the monitoring after the file changes, such as the file changes, automatically reload the file content, and realize the hot deployment of the configuration file. code: package com.yx.demo.filemonitor; import java.io.File; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Timer; import java.util.TimerTask; /** * FileMonitor […]

  • Java implementation of two-dimensional code generation plus background code example

    Time:2021-4-22

    This article mainly introduces the Java implementation of two-dimensional code generation plus background code examples, this article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to pom.xml rely on <! — QR code generation — > <!– https://mvnrepository.com/artifact/com.google.zxing/core –> <dependency> <groupId>com.google.zxing</groupId> […]

  • Implementation of Java UUID serialization by golang

    Time:2021-4-22

    At present, only the fixed UUID generated by Java is implemented: 85bb94b8-fd4b-4e1c-8f49-3cedd49d8f28 package main import ( “encoding/binary” “encoding/json” “fmt” “log” “os” “strings” “time” “github.com/Shopify/sarama” “github.com/google/uuid” ) const ( DATE_TIME_PATTERN = “” STREAM_MAGIC = 0xaced STREAM_VERSION = 5 TC_STRING = 0x74 TC_OBJECT = 0x73 TC_CLASSDESC = 0x72 SC_SERIALIZABLE = 0x02 TC_ENDBLOCKDATA = 0x78 TC_NULL = 0x70 […]

  • Java Web realizes the verification function of login page verification code

    Time:2021-4-21

    1、 Verification code Captcha is essentially a picture, and the content of the picture will be generated randomly with the running of the program The role of verification code: to prevent applications from sending malicious data, to a certain extent, to avoid the attack of malicious programs on the website.Captcha is essentially a picture, the […]

  • Analysis of Des implementation process of java simple data encryption method

    Time:2021-4-18

    This article mainly introduces the java simple data encryption method des implementation process analysis, this article through the example code introduction is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to 1. When the data is transmitted in the network, it needs to be encrypted The […]