How derekyrc/mini-spring works
Project type and purpose
• This is not a web app or microservice but a simplified re-implementation of the Spring Framework’s core IoC and AOP functionality (“mini-spring”).
• Its goal is to let readers explore Spring’s internals via a highly distilled container: XML configuration, Resource loading, BeanFactory, ApplicationContext, BeanPostProcessor/FactoryPostProcessor extension points, type conversion, events, and both JDK- and CGLIB-based AOP.
File structure
• Top-level:
• pom.xml – Maven coordinates and dependencies
• src/main/java/org/springframework/... – core packages:
– aop/* – Advisor, Advice, Pointcut, ProxyFactory, JDK & CGLIB proxies, adapters
– beans/* – BeanDefinition, BeanFactory interfaces, PropertyValue(s)
– beans/factory/* & support/* – AbstractBeanFactory implementations, BeanDefinitionReader, InstantiationStrategy
– beans/factory/xml – XmlBeanDefinitionReader
– context/* – ApplicationContext hierarchy, event multicaster, listeners
– context/annotation – classpath scanning, annotation support
– core/convert & convert/support – ConversionService and converters
– core/io – ResourceLoader and Resource implementations
– stereotype – @Component
– src/test – wide coverage of IoC, AOP, type conversion, events, XML config, annotation injection, circular dependencies, etc.
README for additional insights
• README and changelog enumerate each feature in progressive “chapters”: simple container, bean definition registry, instantiation strategy, property population, XML, BeanPostProcessor/BeanFactoryPostProcessor, ApplicationContext, lifecycle callbacks, Aware interfaces, scope, FactoryBean, events; then AOP (pointcuts, dynamic proxies, CGLIB, ProxyFactory), and extensions (placeholder configurer, package scan, @Value, @Autowired, type conversion), then circular-dependency solutions.