- Replace string concatenation with .formatted() method for better readability - Add StartupStatistics class to track initialization metrics - Add detailed startup logging with timing information - Scan time - IOC time - Injection time - PostConstruct time - Total startup time - Add banner output support (banner.txt or defBanner.txt) - Add @Lazy annotation support for lazy initialization Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
29 lines
635 B
Java
29 lines
635 B
Java
package com.imyeyu.inject.annotation;
|
|
|
|
import java.lang.annotation.ElementType;
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
import java.lang.annotation.Target;
|
|
|
|
/**
|
|
* Bean 作用域注解
|
|
*
|
|
* @author 夜雨
|
|
*/
|
|
@Target(ElementType.TYPE)
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
public @interface Scope {
|
|
|
|
/**
|
|
* 作用域类型
|
|
*/
|
|
ScopeType value() default ScopeType.SINGLETON;
|
|
|
|
/**
|
|
* 是否懒加载(仅对 SINGLETON 作用域有效)
|
|
* true - 首次使用时才创建
|
|
* false - 启动时立即创建(默认)
|
|
*/
|
|
boolean lazy() default false;
|
|
}
|