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>
This commit is contained in:
17
src/main/java/com/imyeyu/inject/InjectException.java
Normal file
17
src/main/java/com/imyeyu/inject/InjectException.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.imyeyu.inject;
|
||||
|
||||
/**
|
||||
* IOC/DI 框架异常
|
||||
*
|
||||
* @author 夜雨
|
||||
*/
|
||||
public class InjectException extends RuntimeException {
|
||||
|
||||
public InjectException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public InjectException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user