Java framework! Dagger2 source code analysis (III)
}
@Override
public String toString() {
return "Engine{" +
"name='" + name + '\'' +
'}';
}
public void run() {
System.out.println("The engine is turning~~~");
}
}
Then we need one Module Class to generate dependent objects. Previously introduced@Module Is used to standard this class, and@Provide It is used ...
Posted by hadeosdin on Thu, 30 Dec 2021 07:04:12 +0100
Design pattern - agent pattern
proxy pattern
Proxy Pattern refers to providing a proxy for other objects to control access to this object. It belongs to structural pattern. In some cases, an object is inappropriate or cannot directly reference another object, and the proxy object can act as an intermediary between the client and the target object.
The agent mode generally ...
Posted by dave_c00 on Thu, 30 Dec 2021 02:07:16 +0100
In the java web section, I summarized all the interview questions
servlet There is a good definition of lifetime, including loading and instantiation, initialization, processing requests, and service termination. This survival period is determined by javax.servlet.Servlet Interfaced init,service and destroy Method expression.
servlet After being instantiated by the server, the container runs its init Met ...
Posted by McMaster on Wed, 29 Dec 2021 23:56:25 +0100
MyBatis Overall Architecture Analysis: Rpc and RMI Services
4.gRPC:gRPC is the underlying network library implemented by the Google team based on Netty development, and this framework also has a GoLanguage version based on NetLibrary development
5.RMI:rmi can be said to be one of the earliest RPC frameworks in java, and this RPC framework is developed by sun team and integrated in JDK. It can be said t ...
Posted by Btown2 on Wed, 29 Dec 2021 23:24:20 +0100
Java advanced learning materials! [deep thinking
Output results:
Second timestamp: 1591778815
Haos timestamp: 1591778815967
Nanosecond: 967 million
If the string format is not correct, for example, it is modified to 2020-06-10T08:46:55.967, Java. Net will be thrown time. format. Datetimeparseexception exception, as shown in the following figure:
2. LocalDate
2.1 get current dat ...
Posted by brodywx on Wed, 29 Dec 2021 21:38:21 +0100
Interview preparation after the 30-year-old test aunt was laid off by the manufacturer (continuously updated) 2
1. Output the value of a key in the json file
// config.json
{"key": "demo",
"value": "demo value"}
import json
with open("config.json", "r") as f:
json_str = f.read()
your_dict = json.loads(json_str)
# get key
print(your_dict["key"])
methoddescribeusagejson.dumpsEncodes Python objects into JSON stringsdata2 = json.dumps(data)json.lo ...
Posted by MarcB on Wed, 29 Dec 2021 18:48:18 +0100
[Spring Boot 2, full set of Java Teaching Video Baidu online disk
Two steps
1. Implement filter interface and filter method
2. Add @ Configuration annotation to add the custom filter to the filter chain
@Configuration
public class WebConfiguration {
@Bean
public RemoteIpFilter remoteIpFilter() {
return new RemoteIpFilter();
}
@Bean
public FilterRegistrationBean tes ...
Posted by juancarlosc on Wed, 29 Dec 2021 18:19:47 +0100
[SpringMVC Notes, Java Classic Interview Questions and Answers
The user makes a request, and the Dispatcher Servlet receives and intercepts the request.
Let's assume the requested URL is: http://localhost:8080/sm/hello
As above, the URL is split into three parts:
http://localhost:8080 Represents a server domain name sm represents a web site deployed on a server hello representation controller
Throu ...
Posted by Frederick on Wed, 29 Dec 2021 16:32:11 +0100
Weekend 5 Summary (exceptions and threads)
I Exception
1.Exception: exception Compile time exception and runtimeException:
Problems occur during the operation of the program (code writing is not rigorous),
As long as it is not a subclass of RuntimeException, it is a compile time exception;
2. Compile time exception: the exception that needs to be checked before the program runs &nbs ...
Posted by tomo11 on Wed, 29 Dec 2021 12:35:04 +0100
Ali's interviewer asked me to talk about volatile. I started with HotSpot and won the interview with a set of combination punches
Hello, I'm Xiao Huang, a Java development engineer in Unicorn enterprise. Thank you for meeting us in the vast sea of people. As the saying goes: when your talent and ability are not enough to support your dream, please calm down and learn. I hope you can learn and work together with me to realize your dream.
1, Introduction
For Java ...
Posted by aspbyte on Wed, 29 Dec 2021 11:44:56 +0100