C ා learning notes [5] - object oriented programming
5.1 definition and declaration of class
5.1.1 constructor
When we construct an object, the initialization process of the object is automatically completed. However, in the process of initializing the object, we need to do some extra work, such as initializing the data stored in the object. The c ...
Posted by almora on Sat, 26 Oct 2019 13:07:50 +0200
idea creating springboot aggregation project
1. Create a parent project, file > New > project, as shown in the following figure:
Click Project to open the following interface:
Click Next, as shown below:
Note: because springboot is an external network, it may not be able to be opened. It needs to be opened through an agent. The agent recommends using SSR win 4.7.0-fix (down ...
Posted by miltonos on Sat, 26 Oct 2019 09:54:33 +0200
How does RocketMQ master and slave synchronize message consumption progress?
I also told you about the rules of RocketMQ read-write separation, but you may ask, how does the consumption progress between the master and slave servers keep pace? Let me give you an answer.
If the consumer consumption mode is different, there will be different ways to save it. The message consumption progress of the consumer side is saved to ...
Posted by anushka on Fri, 25 Oct 2019 09:54:34 +0200
Tomcat source code analysis 3: the source code analysis of Tomcat startup loading process
Source code analysis of Tomcat start loading process (1)
Today, I will share the source code method to explain the loading process of Tomcat startup. For the architecture of tomcat, please refer to the article "Tomcat source code analysis II: first look at the overall architecture of Tomcat".
First look at the application
In the artic ...
Posted by scrupul0us on Fri, 25 Oct 2019 07:03:57 +0200
java entry project: two color ball lottery
Title Requirements:
In addition, the red ball number cannot be repeated
Because I'm not familiar with the use of classes, all of them are written into the same class. The impression is that the output and logic business are separated, but the feeling is not so separated, so it seems that the logic is a ...
Posted by muadzir on Thu, 24 Oct 2019 16:14:16 +0200
easyPoi report export
Easypoi report making tool is easy to operate and easy to use. It is different from that of POI report export, so you need to write your own corresponding tool class. Easypoi export is divided into three parts: basic export, template export and HTML export. The basic export is summarized first.
Basic export: we can export pictures. If the enti ...
Posted by mizz key_me on Thu, 24 Oct 2019 06:12:12 +0200
JVM core knowledge class loading mechanism
The life cycle of a class in a JVM includes seven stages: loading, preparing, validating, parsing, initializing, using, and unloading. Among them, preparation, verification and resolution are classified as connection stage.
Load
What the jvm does at this stage
Get the binary byte stream of the class by the class name
Convert the static s ...
Posted by llanitedave on Wed, 23 Oct 2019 12:48:57 +0200
Spring Security OAuth2 authentication server custom exception handling
The default data format returned by the authentication server is as follows:
{
"error": "unsupported_grant_type",
"error_description": "Unsupported grant type: password1"
}
The above return result is very unfriendly, and the front-end code is also difficult to determine what the error is, so we ...
Posted by gypmaster on Tue, 22 Oct 2019 21:43:38 +0200
Analysis of MyBatis binding module
Package of binding function code
org.apache.ibatis.binding
binding module function
Encapsulating ibatis programming model
In the ibatis programming model, SqlSession is the entry of sql execution. The practical method is sqlSession.selectOne(namespace+id, parameter list) (for example, sqlSession.selectOne("com.enjoylearning.mybatis.mapper ...
Posted by Dilbert137 on Tue, 22 Oct 2019 17:02:45 +0200
Start Java again -- Reflection
concept
reflection: Introspection
Reflection: mirrors reflect sunlight
A java class or object recognizes itself by looking in the mirror
How to realize the mirror in Java language?
The java.lang.reflect package provides the mirror API (application interface)
If you want to use an object of a certain type in the java.lang.reflect package, you ...
Posted by sloede on Tue, 22 Oct 2019 09:02:05 +0200