Article directory 1. Fair lock and unfair lock 2. Reentrant lock 3. Deadlock 4. Verification and troubleshooting of deadlocks 1. Fair lock and unfair lock Still the previous example of selling 30 tickets in three threads: //Resource class class LTicket{<!– –> private Integer number = 30; private final ReentrantLock lock = new ReentrantLock(); public void […]
Tag: nfa
What is the difference between BeanFactory and FactoryBean in Spring?
This is also a classic interview question during Spring interviews. Today we will talk about this topic. In fact, you can tell from the name. BeanFactory is a Factory and FactoryBean is a Bean. Let’s take a look at the summary first: BeanFactory is one of the core interfaces of the Spring framework, used to […]
[Source code analysis] Spring source code interpretation-beanFactory and Bean’s post-processor process
In the previous article, we introduced in detail how spring successfully created beanfactory by loading the xml configuration file. Following the core process, we continue to talk about the post-processing process of beanFactory and Bean. //Template method left to subclasses, allowing subclasses to continue to perform some processing on the factory; Allows post-processing of the […]
Spring – BeanFactoryAware extension interface
Article directory Pre org.springframework.beans.factory.BeanFactoryAware Extension point description Aware interface Execution timing and order of Spring’s built-in Aware interface Source code analysis (direct call) Source code analysis (BeanPostProcessor call execution sequence) Extension point example Pre Spring Boot – List of extension interfaces org.springframework.beans.factory.BeanFactoryAware package org.springframework.beans.factory; import org.springframework.beans.BeansException; /** * Interface to be implemented by beans that […]
Spring BeanFactory
Spring BeanFactory 1.What is Spring BeanFactory Spring BeanFactory is the infrastructure of Spring containers. All containers inherit from BeanFactory. , which is a factory that manages and maintains Spring Beans. BeanFactory is responsible for creating, configuring, and managing Bean instances, and also provides management and control of the Bean life cycle. BeanFactory is the most […]
Springboot extension point series_BeanFactoryPostProcessor
1. Functional features The execution of BeanFactoryPostProcessor is a very important part of the Spring Bean life cycle; BeanFactory level post-processor, org.springframework.beans.factory.config.BeanFactoryPostProcessor#postProcessBeanFactory will only be executed once during the Spring life cycle; Allows the BeanDefinition data to be read after the container reads the BeanDefinition data and before the bean is instantiated, and can be […]
[C++ Implementation] Compilation Principle Convert NFA to equivalent DFA
Experiment name Convert any given NFA to a DFA Requirements NFA converted to equivalent DFA 1. Experimental purpose 1. Master the differences and connections between NFA and DFA; 2. Learn to use the subset construction method to convert NFA into the corresponding DFA. 2. Experimental environment It is recommended to use Visual C++ 6.0; Windows […]
In-depth Spring principles-1.The difference between BeanFactory and ApplicationContext
About the author: Hello everyone, I am Tudou Ni who loves cheese. I am a Java contestant in the 24th class of school admissions. Nice to meet you all. Series of columns: Spring source code, JUC source code If you feel that the blogger’s article is not bad, please support the blogger three times in […]
Using Java to call the Qianfan large model interface
Foreword Originally, I wanted to call the ChatGPT interface, but my ability was limited and I couldn’t get the apiKey of ChatGPT. So I thought about implementing the interface of Wen Xinyiyan (from Baidu’s Qianfan large model). If you need to implement the dialogue function, you will need to pay for calling this interface. The […]
Dynamically modify the path of @FeignClient through BeanFactotyPostProcessor
Recently, a project has a requirement to dynamically modify the request path of @FeignClient after startup. Basically, what I found on the Internet is to use ${…} in @FeignClient and define Feign’s interface path through a configuration file. This does not satisfy us. needs For some special reasons, each of our interfaces has an interfacePath, […]