Commit Graph

2 Commits

Author SHA1 Message Date
f5c6dcd275 refactor: optimize string concatenation and add startup statistics
- 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>
2026-01-13 01:41:49 +08:00
71be7c07c0 implement lightweight IOC/DI framework
- Add annotation system (@Component, @Service, @Configuration, @Bean, @Inject, @Qualifier, @Primary, @Scope, @PostConstruct, @Import, @TimiInjectApplication)
- Implement BeanContext for managing bean instances and definitions
- Implement BeanScanner for component scanning (file system and jar)
- Implement BeanFactory with constructor injection and lifecycle support
- Support @Configuration and @Bean factory methods
- Support @Qualifier and @Primary for multi-implementation
- Support @Scope (singleton/prototype)
- Support @PostConstruct lifecycle callback
- Support @Import and Module extension
- Add circular dependency detection
- Add dependency graph export
- Add demo and test cases

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 12:26:14 +08:00