-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from linyimin0812/feat/20240428_async_bean_in…
…it_support_spring_boot3_1 Feat/20240428 async bean init support spring boot3 1
- Loading branch information
Showing
7 changed files
with
66 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...va/io/github/linyimin0812/async/processor/InstantiationAwareBeanPostProcessorAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package io.github.linyimin0812.async.processor; | ||
|
||
import org.springframework.beans.BeansException; | ||
import org.springframework.beans.PropertyValues; | ||
import org.springframework.beans.factory.config.SmartInstantiationAwareBeanPostProcessor; | ||
|
||
import java.beans.PropertyDescriptor; | ||
import java.lang.reflect.Constructor; | ||
|
||
/** | ||
* @author linyimin | ||
**/ | ||
public class InstantiationAwareBeanPostProcessorAdapter implements SmartInstantiationAwareBeanPostProcessor { | ||
public Class<?> predictBeanType(Class<?> beanClass, String beanName) throws BeansException { | ||
return null; | ||
} | ||
|
||
public Constructor<?>[] determineCandidateConstructors(Class<?> beanClass, String beanName) throws BeansException { | ||
return null; | ||
} | ||
|
||
public Object getEarlyBeanReference(Object bean, String beanName) throws BeansException { | ||
return bean; | ||
} | ||
|
||
public Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException { | ||
return null; | ||
} | ||
|
||
public boolean postProcessAfterInstantiation(Object bean, String beanName) throws BeansException { | ||
return true; | ||
} | ||
|
||
public PropertyValues postProcessProperties(PropertyValues pvs, Object bean, String beanName) throws BeansException { | ||
return null; | ||
} | ||
|
||
public PropertyValues postProcessPropertyValues(PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) throws BeansException { | ||
return pvs; | ||
} | ||
|
||
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { | ||
return bean; | ||
} | ||
|
||
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { | ||
return bean; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
io.github.linyimin0812.async.AsyncBeanAutoConfiguration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters