Category:Software Design

  • What is the LSP principle

    Time:2022-8-2

    If this article can help you, please give me a free praise, thank you qwq!   The LSP principle is not difficult, but it is wordy in some places. If you are still confused about LSP, please look down. First code: public class Bird { public void fly(){} }public class Duck extends Bird{} At first […]

  • OAuth license agreement | in the era of cloud nativity, should we know more about OAuth?

    Time:2022-8-2

    We are not here because we are free .we are here because we are not free. We are not here because we are free, we are here because we are not free—— Matrix Write at the beginning In the best era of the Internet, with the increase of business product lines and business application platforms, […]

  • Spring boot admin monitoring center configuration login password

    Time:2022-7-31

    1. POM joins security <dependency> <groupId>org.springframework.bootgroupId> <artifactId>spring-boot-starter-securityartifactId> dependency> 2. Add the configuration class securitysecureconfig package org.fh.config; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler; import de.codecentric.boot.admin.server.config.AdminServerProperties; /** *Description: securitysecure configuration *Author: FH admin * from:fhadmin.cn */ @Configuration public class SecuritySecureConfig extends WebSecurityConfigurerAdapter { private final String adminContextPath; public SecuritySecureConfig(AdminServerProperties adminServerProperties) { this.adminContextPath = adminServerProperties.getContextPath(); } […]

  • Factory and strategy mode implementation scheme of coupons

    Time:2022-7-30

      The most frequently used modes in real development are basically [strategy] and [factory]. First introduce some concepts and examples of models according to “international practice”. (refer to head first for example, but try to be simpler and clearer than it.) After that, the design and mode application of coupons will be explained in detail. […]

  • Implementation scheme of iteration and combination mode of general tree structure

    Time:2022-7-29

    In the daily development process. Tree structure is used very frequently. For example: company organizational structure, various classification structures, grouping structures, etc.         SET FOREIGN_KEY_CHECKS = 0; CREATE TABLE IF NOT EXISTS `tbl_sapo_group` ( `id` int(10) unsigned NOT NULL AUTO_ Increment comment ‘primary key’, `Code ` varchar (100) not null comment ‘unique […]

  • Linux system centos7 builds elk distributed logging system based on docker

    Time:2022-7-29

    Elk basic overview Elk is the abbreviation of elasticsearch, logstash and kibana. It is often used to deploy distributed system log services. Elasticsearch: global real-time full-text search and analysis engine, which provides three functions of data collection, analysis and storage; It is a scalable distributed system with open rest and Java API structures that provide […]

  • Adaptation and packaging mode application of multi system docking

    Time:2022-7-28

      In the daily development system, it is usually necessary to connect multiple systems and use the adapter mode. For example, the payment method involves the docking of multiple systems. International practice, first introduce the concept.   Adapter mode:   When it comes to adapters, you can naturally think of power adapters for mobile phones. […]

  • 3、 Handwriting springmvc framework, the third improvement

    Time:2022-7-28

    1 .Solve the jump problem: add aloginMethod, jump to return a string.   The central controllerDispacherServletcallEmpControllerSo the string is returned to the central controller.As shown in the figure below: the central controller helps us do it uniformly Forwarding of resources(forward/include) orRedirection. 1.1 update empcontroller code 1.2 change the dispatcherservlet code           […]

  • Design mode – create mode – singleton mode (c++)

    Time:2022-7-27

    1. Foreword Singleton mode is a creation mode, which ensures that a class has only one instance and provides a global access point to access it. The singleton mode ensures that a class has only one instance, and instantiates itself and provides this instance to the whole system. This class is called a singleton class, […]

  • Spring official announcement high-risk vulnerability springboot 2.6.6 has been fixed

    Time:2022-7-27

    The spring vulnerability that broke out a few days ago, just repaired and came again? loophole CVE-2022-22965 Vulnerability name Remote Code Execution Vulnerability Severity level high-risk Scope of influence Spring Framework– 5.3.0 ~ 5.3.17– 5.2.0 ~ 5.2.19-Old version and other unsupported versions This is a high risk, which must be paid attention to Users can […]

  • Introduction and description of Java observer mode

    Time:2022-7-26

    Transferred from: http://www.java265.com/JavaCourse/202206/3741.html The following is an introduction to the observer model, as shown below Observer mode Observer mode: It is called publish/subscribe mode Used to define a one to many dependency, When the state of an object changes, the objects that depend on it will be notified Advantages of observer mode: 1. The observer […]

  • Springboot configuring domestic Damon database

    Time:2022-7-26

    1. pom  <dependency> <groupId>com.dmgroupId> <artifactId>DmJdbcDriver18artifactId> <version>1.8version> dependency> There is no one in Maven central warehouse, and it needs to be manually installed in Maven local warehouse mvn install:install-file -Dfile=D:\1\DmJdbcDriver18.jar -DgroupId=com.dm -DartifactId=DmJdbcDriver18 -Dversion=1.8 -Dpackaging=jar 2. Druid configuration application.properties #Data source 1 datasource.no1.driver-class-name: dm.jdbc.driver.DmDriver datasource.no1.url=jdbc:dm://192.168.0.11:5238/SYSDBA?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 datasource.no1.username=SYSDBA datasource.no1.password=root123456789 3. Configuration class package org.fh.config; import java.sql.SQLException; import javax.sql.DataSource; import […]