add injector to InjectApp

This commit is contained in:
Timi
2025-07-15 16:46:05 +08:00
parent 0970569738
commit 05606eda74
2 changed files with 7 additions and 0 deletions

View File

@ -15,6 +15,8 @@ public final class InjectApp {
Class<?> clazz; Class<?> clazz;
TimiInject injector;
boolean enableBanner = true; boolean enableBanner = true;
/** 全局注入后监听,包括静态注入 */ /** 全局注入后监听,包括静态注入 */
@ -34,6 +36,10 @@ public final class InjectApp {
return this; return this;
} }
public TimiInject injector() {
return injector;
}
/** /**
* 添加全局注入后监听 * 添加全局注入后监听
* *

View File

@ -82,6 +82,7 @@ public class TimiInject implements InjectFactory {
if (TimiJava.isEmpty(app)) { if (TimiJava.isEmpty(app)) {
throw new NullPointerException("empty inject app"); throw new NullPointerException("empty inject app");
} }
app.injector = this;
// 初始化 // 初始化
long initAt = Time.now(); long initAt = Time.now();
// Logo // Logo