spring session + redis to realize distributed session

introduction In general, in order to solve a single point of failure, web applications in the production environment will be deployed on multiple platforms, so there will be a problem. When we log in, we will store the login information in the session. If we rely on the session in the native web con ...

Added by mouloud2001 on Tue, 09 Jun 2020 05:20:25 +0300

Page Search Box Date Search Criteria Data to Background Type Conversion (Timestamp)

The date type defined by the background database is Long, which is stored as a time stamp; the date type of the search box on the page is String.The String and Long types of dates are not equal on time stamps! I show you how to convert date types in my code, and you can understand the difference between debug and timestamp converters.     1. Fi ...

Added by zahadum on Mon, 08 Jun 2020 19:15:00 +0300

Responsibility chain model of behavior model

1 General Chain of responsibility pattern is a common behavior pattern. It encapsulates the processor into a processing chain, so that the request can be delivered on the chain. The processor on the chain decides whether to process the request or not. 2 responsibility chain mode A typical usage scenario of responsibility chain mode is when an e ...

Added by Nymphetamine on Sat, 06 Jun 2020 13:17:26 +0300

TOMCAT source code analysis -- start

TOMCAT source code analysis - start Preposition The source version of Tomcat is version 9.0.35 downloaded from the official website. configuration file The configuration file started by Tomcat is server.xml The start-up process is all around it, and the module structure of Tomcat can also be seen ...

Added by anthylon on Sat, 06 Jun 2020 09:05:19 +0300

Spring obtains single instance process

After reading this article, you will get In the getBean method, Spring handles aliases and the name of factoryBean How Spring gets beans from multi-level cache according to beanName How Spring deals with getting common beans and factorybeans from users introduction from Initialization of Spring container In, we learned how Spring convert ...

Added by SirEddie on Sat, 06 Jun 2020 08:47:18 +0300

Simple use of redis distributed lock

RedisLock -- make Redis distributed lock simple catalog 1. Project introduction 2. Fast use 2.1 introducing maven coordinates 2.2 register RedisLock 2.3 use 3. Participation and contribution 4. Contact the author 5. Open source protocol 1. Project introduction This project mainly simplifies the operation of redis distributed transact ...

Added by work_it_work on Sat, 06 Jun 2020 05:57:21 +0300

Database idle connection disconnection caused by firewall

catalog 1, Problem description 2, Step by step analysis of problems 1, java.net.SocketException : how is the broken pipe exception generated? What's the impact? 2. Why is the database TCP connection broken? 3. The effect of firewall cutting off database connection 3, Solutions 1. Adjust the cut-of ...

Added by Popcorn on Fri, 05 Jun 2020 10:51:02 +0300

[JVM Story] The Birth of a Java Byte Code File

Long text in thousands of words, completely fictitious.   (1)   An intern came to the group. After Li Dafang finished, he felt his level was average, but he still stayed. Why?Let's guess.Li Da-fat also enlightened himself in his heart. Students should not ask too much, as long as they are willing to go up and slowly.Just call it Xiao Bai.Xi ...

Added by Kingw on Fri, 05 Jun 2020 03:51:28 +0300

Student management system (BS version) & file upload

Student management system (BS version) & file upload 1, Student management system (BS version) 1.1 environment construction Create project, create package, add jar package Four jsp pages Home page( index.jsp) Use the index.jsp Yes, provide a hyperlink to all student list pages All st ...

Added by JamesyBHOY on Thu, 04 Jun 2020 16:21:25 +0300

HashMap: Source code (constructor, put, resize, get, remove, replace)

1. Constants (1) Default table size, 1 shifts left four bits to 8 static final int DEFAULT_INITIAL_CAPACITY = 1 << 4; // aka 16 (2) Maximum table length static final int MAXIMUM_CAPACITY = 1 << 30; (3) Default load factor size: static final float DEFAULT_LOAD_FACTOR = 0.75f; (4) Tree threshold static final int TREEIFY_ ...

Added by defect on Thu, 04 Jun 2020 07:52:52 +0300