mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-17 00:26:30 +00:00
doc[event]: 更新文档和注释
This commit is contained in:
@@ -20,10 +20,11 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
/**
|
||||
* 通过@Import注解先注册下EventRegisterProcessor对象,当每个bean对象被注入到IOC容器后,都会经过EventRegisterProcessor这个后置处理器,
|
||||
* 从而在里面扫描每个bean对象,得到带有@EventReceiver注解的方法
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
* 笔记:通过@Import注解先注册下EventRegisterProcessor对象,当每个bean对象被注入到IOC容器后,都会经过EventRegisterProcessor这个后置处理器,
|
||||
* 从而在里面扫描每个bean对象,得到带有@EventReceiver注解的方法
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Import({EventRegisterProcessor.class})
|
||||
|
||||
@@ -25,12 +25,12 @@ import org.springframework.context.annotation.Configuration;
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
* 注意:OrmConfig的装配在于具体的业务游戏中,业务游戏中不配置OrmConfig这个Bean,那么这里的Orm自动装配也不会生效。
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean(OrmConfig.class)
|
||||
public class OrmAutoConfiguration {
|
||||
|
||||
// OrmConfig的装配在于具体的业务游戏中,业务游戏中不配置OrmConfig这个Bean,那么这里的Orm自动装配也不会生效。
|
||||
@Bean
|
||||
@ConditionalOnBean(OrmConfig.class)
|
||||
public OrmManager ormManager(OrmConfig ormConfig) {
|
||||
|
||||
@@ -31,7 +31,7 @@ import java.lang.reflect.Modifier;
|
||||
public abstract class EnhanceUtils {
|
||||
|
||||
static {
|
||||
// 适配Tomcat,因为Tomcat不是用的默认的类加载器,而Javaassist用的是默认的加载器
|
||||
// 适配Tomcat,因为Tomcat不是用的默认的类加载器,而Javassist用的是默认的加载器
|
||||
var classArray = new Class<?>[]{
|
||||
IEventReceiver.class,
|
||||
IEvent.class
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.lang.reflect.Modifier;
|
||||
public abstract class EnhanceUtils {
|
||||
|
||||
static {
|
||||
// 适配Tomcat,因为Tomcat不是用的默认的类加载器,而Javaassist用的是默认的加载器
|
||||
// 适配Tomcat,因为Tomcat不是用的默认的类加载器,而Javassist用的是默认的加载器
|
||||
var classArray = new Class<?>[]{
|
||||
IScheduler.class
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user