Commit Graph

3 Commits

Author SHA1 Message Date
372026b716 fix @Import duplicate registration and add JavaFX demo test
- Fix @Import processing to skip already registered beans from package scan
- Add extractBeanName helper method for bean name extraction
- Set MainController to PROTOTYPE scope to avoid eager initialization
- Add FxDemoTest for testing JavaFX components without GUI
- Test configuration beans, services, and dependency injection
- All JavaFX demo components tested successfully

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 12:35:38 +08:00
13926ea24a add JavaFX demo application
- Add FxMain as JavaFX application entry with IOC integration
- Add FxConfig with @Bean factory methods for DateTimeFormatter
- Add MainController with constructor injection
- Add UserService and MessageService layers
- Add main.fxml view with user management UI
- Add javafx-fxml dependency and javafx-maven-plugin
- Add demo documentation and run script
- Demonstrate @Controller, @Service, @Qualifier, @PostConstruct in JavaFX context

Run with: mvn javafx:run or run-javafx-demo.bat

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 12:31:50 +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