SpringBoot core mechanism IV. FailureAnalyzer
1, Custom error analyzer
First throw an exception in the main method:
@SpringBootApplication
public class P1Application implements CommandLineRunner {
public static void main(String[] args) {
final SpringApplication application = new SpringApplication(P1Application.class);
application.run(args);
}
@Autowired
...
Posted by filn on Fri, 18 Feb 2022 13:41:37 +0100
java Multithread synchronization and inter thread communication
1. Thread synchronization
What is thread synchronization? Let's first look at a piece of code of the ticket selling system, and then analyze this problem:
package com.test;
/**
* @decrition Simulated ticket selling thread
*/
public class Ticket implements Runnable
{
//Number of votes currently owned
private int num = 100;
public void ...
Posted by Stalingrad on Fri, 18 Feb 2022 13:24:40 +0100
[ruoyi] learning notes on open source framework 02 - Shiro permission framework
data
According to the document introductionShiro official documents
↑ the link of Shiro document is an official introduction to the quick start. In fact, it will be easier to understand ruoyi's document about the integration of the framework.
If according to the structure
1. Security Manager
The Subject body represents the ...
Posted by bk6662 on Fri, 18 Feb 2022 13:16:29 +0100
[LeetCode - Java]350. Intersection of two arrays II (simple)
1. Title Description
2. Problem solving ideas
Intersection means to have a "global view" of the two arrays. One embodiment of the "global view" in the program is statistics. Therefore, I can use the hash table to count the occurrence times of each element in the two arrays, and then take the small value to build a ne ...
Posted by Rowno on Fri, 18 Feb 2022 13:13:51 +0100
Grain College - integrated ECharts
Statistical analysis module
Demand: count the number of registrants of online education every day, and use the chart to display the number of registrants
preparation
Code generation and configuration file omission~~
Database tables: statistics_daily, which stores statistical data
CREATE TABLE `statistics_daily` (
`id` char(19) NOT NULL C ...
Posted by arbab on Fri, 18 Feb 2022 12:40:46 +0100
You can always trust String!
String & Immutable
1. Concepts
String classes are modified by final, and similar final-modified classes include wrapper classes such as Integer, Double, and so on. As we learned in our second grade, final-modified classes are inheritable. In Java, final-modified classes are called "immutable classes". Curious classmates may ask, ...
Posted by Rother2005 on Fri, 18 Feb 2022 12:17:21 +0100
SpringCloud microservice practice -- building an enterprise level development framework: design and implementation of microservice logging system
according to the business requirements that business developers usually face, we divide the log into operation (request) log and system operation log. The operation (request) log allows administrators or operators to easily query and track the specific operations of users in the system interface, so as to analyze and count user beh ...
Posted by drayfuss on Fri, 18 Feb 2022 11:32:54 +0100
Design mode - singleton mode
1, Hungry Han style
Constructor privateClassExpose a static method
1. Static constant
Test class
public class SingletonTest01{
public static void main(String[] args){
Singleton singleton = Singleton.getInstance();
Singleton singleton1 = Singleton.getInstance();
System.out.println(singleton == singleton1 );
}
}
Hungry Han for ...
Posted by tensitY on Fri, 18 Feb 2022 10:48:38 +0100
Detailed configuration and usage examples of Spring AOP
What is AOP
AOP (Aspect Oriented Programming) means: aspect oriented programming, which realizes the unified maintenance of program functions through precompiled mode and runtime dynamic agent. AOP is a continuation of OOP. It is not only a hot spot in software development, but also an important content in Spring framework. It is a derivative ...
Posted by maheshbaba on Fri, 18 Feb 2022 10:35:34 +0100
javaweb green orange project-7-82
Chapter 7 login and authentication
Learning objectives
Can use BCrypt for password encryption Getting started with Spring Security Complete green orange login authentication Complete the green orange menu display Complete user login log Project sequence-7: https://github.com/Jonekaka/https-github.com-Jonekaka-javaweb-qingcheng-7-82.git
1 ...
Posted by cdhames on Fri, 18 Feb 2022 10:26:43 +0100