Comprehensive and thorough analysis of factory method mode

This article is excerpted from "design patterns should be learned this way"1. Application scenario of factory method modeThe factory method mode is mainly applicable to the following application scenarios.(1) Creating objects requires a lot of repetitive code.(2) The client (application layer) does not depend on the details of how pro ...

Posted by NCllns on Thu, 11 Nov 2021 07:34:37 +0100

Chapter 6 Advanced Shell script programming

7.9 examples Example: generate 10 random numbers, save them in the array, and find their maximum and minimum values [root@rocky8 ~]# vim max_min.sh #!/bin/bash # #********************************************************************************************** #Author: Raymond #QQ: 88563128 #Date: 2021-10-22 #FileName: ...

Posted by webAmeteur on Thu, 11 Nov 2021 05:36:57 +0100

Implementation of front-end and back-end separation based on MVC three-tier architecture (tourism management system project)

Implement front-end and back-end "tourism management system" based on mvc three component architecture 1. MVC three-tier architecture description 1.1. User Interface Layer, in which the User Interface Layer is used to display data and receive data input by users to provide an interface for user interaction1.2. Business Logic Layer, ...

Posted by suicide-boy on Wed, 10 Nov 2021 04:36:26 +0100

You think the delegation model is mysterious, but you use it every day

This article is excerpted from "design patterns should be learned this way" 1. Use delegation mode to simulate task allocation scenarios We use code to simulate the business scenario where the boss assigns tasks to employees. First, create the IEmployee employee interface. public interface IEmployee { void doing(String task) ...

Posted by Amit Rathi on Tue, 09 Nov 2021 11:53:54 +0100

[architect interview - JVM principle-2] - JVM loading class process

1: Overall architecture of Java program runtime   Java starts the JVM through the latch program, loads the class through the class loader, and first loads the metadata information of the class, including the method instructions compiled by the class. This information is first placed in the Method Area. The data in the Method area is Runtim ...

Posted by smarlowe on Sun, 07 Nov 2021 02:21:13 +0100

Construction of MMM high availability architecture for MySQL database

1, MMM overview 1. What is MMM   MMM (Master Master replication manager for MySQL) is a script program that supports dual master failover and dual master daily management. Mmm is developed in Perl. It mainly monitors and manages MySQL master master replication. Although it is called dual master replication, only one master is allow ...

Posted by sarmad_m_azad on Thu, 04 Nov 2021 12:02:48 +0100

Actual combat of Spring Cloud microservice -- Construction of nacos Service Registry (with source code)

As one of the basic functions of microservices, the registry plays an important role. Microservices divide individual services into services under different modules, and what about communication calls for services of different modules? This requires service registration and discovery. This article will use Alibaba's open source project nacos to ...

Posted by FirePhoenix on Wed, 03 Nov 2021 07:03:36 +0100

A series of operations triggered by "@ Value injection failed" in "SpringBoot source code"

background In the project, I want to inject a field with @ Value, but I didn't expect that the injection was unsuccessful, but I can do it in another way, so I want to know the reason why the @ Value annotation was unsuccessful. The code in this article is based on Spring version 5.3.8 Simulate @ Value successful scenario First of all, in o ...

Posted by Shroder on Tue, 02 Nov 2021 13:57:24 +0100

Chapter IX disk storage and file system management

1. Disk structure 1.1 equipment documents Everything is a file: open(), read(), write(), close() Device file: associated with a device driver, which can communicate with the corresponding hardware device Equipment number: Main equipment number: major number, which identifies the equipment typeSecondary equipment number: minor number, which ...

Posted by stomlin on Mon, 01 Nov 2021 02:19:25 +0100

High frequency interview question: a picture to thoroughly understand Spring circular dependency

1 what is circular dependency? As shown in the figure below: BeanA class depends on BeanB class, and BeanB class depends on BeanA class. This dependency forms a closed loop, which we call circular dependency. Similarly, see the following figure: In the above figure, BeanA class depends on BeanB class, BeanB class depends on BeanC class, an ...

Posted by powlouk on Sat, 30 Oct 2021 09:33:39 +0200