Spring - dependency injection
1. Concept
The so-called dependency injection (DI) actually means that when a bean instance references another bean instance, the spring container helps us create a dependent bean instance and inject (pass) it into another bean.
Dependency: the creation of a Bean object depends on the container, and the Bean object depends on resourcesInj ...
Added by nikneven on Wed, 02 Mar 2022 00:06:47 +0200
[MyBatis notes] 7 - customize the mapping resultMap, handle the one to many / many to one mapping relationship, handle the consistency of attribute fields, and load MyBatis lazily
Video link: https://www.bilibili.com/video/BV1VP4y1c7j7?p=48&spm_id_from=pageDriver
preparation
(1) New maven project
See the following steps for details: https://editor.csdn.net/md/?articleId=123185097
(2) Create two forms in sql: t_emp,t_dept
t_dept form:
t_emp form:
Add a did to connect with the primary key of the ...
Added by BrettCarr on Tue, 01 Mar 2022 18:32:40 +0200
Configuring and using servlets in IDEA
Configuring and using servlets in IDEA
Crazy God says Java
1. Introduction to Servlet
Servlet is a technology for sun company to develop dynamic websun provides an interface called Servlet in these API s. If you want to develop a Servlet program, you only need two steps:
Write a class to implement the Servlet interfaceDeploy the deve ...
Added by buluk21 on Tue, 01 Mar 2022 10:27:52 +0200
HTML, JSP paging ideas and code implementation (both non plug-ins and plug-ins)
Non plug-in, pure code implementation
This is the effect diagram of code implementation:
First, if the normal pagination is written for the first time, you can modify it on this basis after all the tables are written.
Parameters to be added: start from the first few, query several pieces of data, pageSize (self determined), to ...
Added by BenS on Sun, 27 Feb 2022 04:37:33 +0200
Java is really not difficult to Log4j log
Log4j log:
What is Log4j? log4j is a common logging framework, which is used to record the execution process or exceptions of the application. It is recorded in the log file. The operation and exception information of the application can be known through the log file.
Why log? We know that the program will produce a lot of information during ...
Added by Warptweet on Fri, 25 Feb 2022 14:59:00 +0200
[high concurrency] deeply analyze the Callable interface
Hello, I'm glacier~~
This article is pure dry goods. It deeply analyzes the Callable interface from the perspective of source code. I hope you can step down, open your IDE, and follow the article to see the source code. I believe you will gain a lot.
1. Introduction to callable interface
The Callable interface is jdk1 5 new generic interface ...
Added by mastercjb on Thu, 24 Feb 2022 12:23:23 +0200
Dependency injection learning notes
Ioc overview
Ioc(Inversion Of Control) is translated as control inversion
First, make it clear that the control without inversion is "active control"
Active control: all the codes we wrote before are active control, which means that we can instantiate whatever objects are needed during the running of the programInversion of control ...
Added by Jack McSlay on Thu, 24 Feb 2022 11:50:27 +0200
Annotation development of MyBatis
Mybatis annotation development single table operation
1. Common notes of mybatis
In recent years, annotation development has become more and more popular. Mybatis can also use annotation development, which can be used to reduce the writing of Mapper
Mapping file.
@Insert: add
@Update: implement update
@Delete: delete
@Select: implement q ...
Added by hemantraijain on Thu, 24 Feb 2022 02:45:23 +0200
[Java] multithreading (taking java webcam as an example)
[Java] multithreading (taking the realization of video function as an example)
step1: how to realize video
Video is realized by pictures, so we only do two things: 1) Find an interface that can call the camera 2) Use this interface to get the picture of every moment 3) Draw these pictures in a continuous cycle
Step 2: why can't you turn ...
Added by hellangel on Wed, 23 Feb 2022 10:12:56 +0200
Installation and use of Java development artifact Lombok
install
Lombok installation is divided into two parts: the installation of Idea plug-in and the import of pom file in maven.
Installation of Idea plug-in
Click settings, select plug-ins, search Lombok (Networking required) in the plug-in configuration of Idea or download local installation on the official website, and click initialize in ...
Added by emceej on Tue, 22 Feb 2022 14:46:03 +0200