Java Learning Notes 9-1 - JavaWeb
HTTP
HTTP Request
Client - Request - Server Baidu:
Request URL:https://www.baidu.com/Request Address
Request Method:GET get Method/post Method
Status Code:200 OK Status code: 200
Remote(Remote) Address:14.215.177.39:443
Accept:text/html
Accept-Encoding:gzip, deflate, br
Accept-Language:zh-CN,zh;q=0.9 language
Cache-Control:ma ...
Added by cyrixware on Tue, 15 Feb 2022 20:33:50 +0200
(springboot 03) day52javaEE basic missing
1. Paging query.
//Configure Paging Interceptors
@Configuration
public class MybatisPlusConfig {
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor(){
//1 Create MybatisPlus Interceptor interceptor object
MybatisPlusInterceptor mpInterceptor=new MybatisPlusInterceptor();
//2 Add Paging Interceptor
...
Added by wulfgar on Tue, 15 Feb 2022 19:22:23 +0200
JDBC(Java DataBase Connectivity)
JDBC(Java DataBase Connectivity)
JDBC(Java DataBase Connectivity): a set of specifications (classes and interfaces) defined by sun company in order to simplify and unify Java database connection.
JDBC is a standard Java API for database independent connection between Java programming language and database.
Relationship between JDBC and ...
Added by greenhorn666 on Tue, 15 Feb 2022 16:16:03 +0200
java thread startup, security issues (atomicity, visibility)
Two ways to start threads
psvm(){
/*Method 1*/
Thread t1 = new Thread(){
int num;
@Override
public void run() {
//process
}
};
t1.start(); //It can only be started once
t1.start(); //report errors!!!
Thread t2 = new Thread(){
int num;
@Override
...
Added by epimeth on Tue, 15 Feb 2022 16:15:40 +0200
Array: question brushing record
Overview of knowledge points:
1. Sum of two numbers:
Given an integer array , nums , and an integer target value , target, please find the , and the , integers with the target value , target , in the array and return their array subscripts.
You can assume that each input will correspond to only one answer. However, the same e ...
Added by cuvaibhav on Tue, 15 Feb 2022 15:34:49 +0200
SpringBoot project initialization
catalogue
1. Create the working directory structure and modify it to yml file.
2. Unified web return object R type.
3. Configure Swagger.
4. Create a custom exception class:
5. Streamline the exception message returned to the front end:
6. Database and tomcat server configuration:
1. Configure tomcat server
2. Configure mySQL
3. Config ...
Added by fredi_bieging on Tue, 15 Feb 2022 15:18:28 +0200
[java notes] class inheritance
catalogue
Characteristics of inheritance relationship:
Three variables have the same name:
The characteristics of calling member methods in inheritance:
override of methods in inheritance:
Preserve the functionality of the method of the parent class when overridden
Access characteristics of construction methods in inheritance:
super keyw ...
Added by avatar.alex on Tue, 15 Feb 2022 15:01:00 +0200
Ten minutes take you to understand multithreading - multithreaded teamwork: synchronous control
Multithreaded teamwork: synchronous control
Synchronization control is an essential means for concurrent programs. The previously introduced keyword synchronized is one of the simplest control methods, which determines whether a thread can access critical zone resources. At the same time, object Wait() method and object The notify () method pl ...
Added by mindrage00 on Tue, 15 Feb 2022 14:51:09 +0200
Causes and optimization of excessive offset affecting performance in mysql query
1 problem status
At first, we used the simplest offset+limit paging query method. The pseudo code is as follows:
List<Student> students = new ArrayList<>();
int limit = n;
int offset = 0;
do {
students = SELECT * FROM [table] WHERE status = [status] AND gradeId = [id] LIMIT [limit] OFFSET [offset];
push(pos);
update [table] ...
Added by river001 on Tue, 15 Feb 2022 14:12:03 +0200
Time class (Date, LocalDateTime...) Exception class (try..catch, throw, throws, throwable)
Time class
Date
SimpleDateFormat
JDK8 new date class
Exception class
Exception overview
Exception handling method
Custom exception
time
Time in life There is no unified standard for the time of each country. They all calculate their own time, okay? The answer is No World standard time Greenwich mean time (GMT) Th ...
Added by OopyBoo on Tue, 15 Feb 2022 12:37:57 +0200