The Implementation Principle of Spring AOP and Its Example
The Implementation Principle of Spring AOP and Its Example
spring implements AOP by relying on JDK dynamic proxy and CGLIB proxy.
Following is a brief introduction to JDK dynamic proxy and CGLIB proxy
JDK dynamic proxy: Its proxy object must be the implementation of an interface. It is the proxy of the ...
Posted by StefanRSA on Mon, 14 Oct 2019 17:25:54 +0200
Java String split Trampling
1.1 The pit of split
A couple of days ago in the company to pass FTP The data files uploaded by this method are parsed in a prescribed format and then put into storage. The general idea of code implementation is as follows: first, read the files by stream, parse and encapsulate each line of data into an object, and then carry out the operation ...
Posted by Ravi Kumar on Mon, 14 Oct 2019 15:34:12 +0200
Why Netty's FastThreadLocal is fast
Preface
Recently, when looking at the netty source code, I found a class called FastThreadLocal. JDK itself has a ThreadLocal class, so I can roughly think of this class is faster than jdk's own, where is the main speed, and why it is faster. Here is a brief analysis.
performance testing
ThreadLocal is mainly used in multi-threaded environm ...
Posted by v0id on Mon, 14 Oct 2019 13:53:46 +0200
2. hdfs architecture
[TOC]
I. Overview of HDFS System Composition
This is a distributed file system that is suitable for scenarios where multiple reads are written at one time. Contains the following roles:
NameNode(nn):
Store metadata of files, such as file name, file directory structure, file attributes and so on, as well as block list of each file and DataNode ...
Posted by Nilanka on Mon, 14 Oct 2019 05:24:03 +0200
java Foundation (20):Map, Variable Parameters, Collections
1. Map interface
1.1 Overview of Map Interface
By looking at the description of the Map interface, we find that the collection under the Map interface is different from the collection under the Collection interface. They store data in different forms, as shown in the following figure.
In collections, elements exist in isolation (u ...
Posted by jovankau on Fri, 11 Oct 2019 05:51:50 +0200
7. AOP Creation Agent for Spring Source Analysis 7
1. Prepare to create an agent
protected Object wrapIfNecessary(Object bean, String beanName, Object cacheKey) {
//1. Finding Enhancers
Object[] specificInterceptors = getAdvicesAndAdvisorsForBean(bean.getClass(), beanName, null);
if (specificInterceptors != DO_NOT_PROXY) {
//2. Creating Agents
Object proxy = createProxy(bea ...
Posted by denoteone on Thu, 10 Oct 2019 20:54:33 +0200
lombok goes deep into practice
Official website video
Official address: https://projectlombok.org
The home video of the official website demonstrates how to use Lombok in eclipse.
Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java.
Never write another getter or equals method again, with one annotation your class ...
Posted by Johns3n on Thu, 10 Oct 2019 14:57:24 +0200
Spring 5 Source Parsing 7-Configuration Class Post Processor
Configuration ClassPostProcessor inherits the BeanDefinitionRegistryPostProcessor interface, which implements the postProcessBeanDefinitionRegistry and its parent BeanFactoryPostProcessor#postProcessBeanFactory method.
For an analysis of the postProcessBean Definition Registry method, see: Spring 5 Source Learning (5) Configuration Class Post P ...
Posted by mrbill501 on Thu, 10 Oct 2019 06:29:08 +0200
Java multithreading - thread abortion
Incorrect thread abort - Stop
Stop: Discontinues threads and clears information about monitor locks, but may causeJDK is not recommended for thread security issues.Destroy: JDK does not implement this method.
/**
* @author simon
*/
public class StopThread extends Thread {
private int i = 0, j = 0;
@Override
public void run() {
...
Posted by The_broken on Sun, 06 Oct 2019 04:15:50 +0200
Weblogic 12.1.3.0 silent installation
I. jdk installation
Install jdk1.7.0_80
Unzip to / usr/local/jdk1.7.0_80
Modify environment variable vi/etc/profile
II. Creating Users
Create a group: group add Weblogic
Create users: useradd-g Weblogic Weblogic
Modify password: passwd weblogic
Enter password***
III. Installation of Weblogic 12C
...
Posted by christo16 on Fri, 04 Oct 2019 09:12:42 +0200