# derekyrc/mini-spring

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/derekyrc-mini-spring).**

6,360 stars · 1,451 forks · Java · Apache-2.0

## Links

- GitHub: https://github.com/DerekYRC/mini-spring
- Homepage: https://github.com/DerekYRC/mini-spring
- awesome-repositories: https://awesome-repositories.com/repository/derekyrc-mini-spring.md

## Topics

`mini-spring` `spring` `spring-boot` `spring-mvc` `springboot` `springframework` `tiny-spring`

## Description

mini-spring is a Java dependency injection framework and inversion of control container. It manages the full lifecycle of beans, including instantiation, property population, and scope management, while providing a system for automating the wiring of components.

The project implements a Java AOP framework that uses dynamic proxies to intercept method calls for cross-cutting logic. It also functions as a Java component scanner to automatically discover and register managed objects via annotations and as a Java event bus to decouple components through a publish-subscribe multicast system.

The container supports bean definition through XML configuration and annotation-based scanning, alongside a three-level cache to resolve circular dependencies. It includes a post-processor hook pipeline to modify bean definitions and instances, and a resource loader to resolve property placeholders from external files.

## Tags

### Software Engineering & Architecture

- [Dependency Injection](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection.md) — Implements a core dependency injection system for managing object lifecycles and resolving dependencies. ([source](https://github.com/DerekYRC/mini-spring/blob/main/README_en.md))
- [Dependency Injection Containers](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-containers.md) — Provides a central inversion-of-control container to manage the full lifecycle and dependency resolution of beans.
- [Inversion-of-Control Containers](https://awesome-repositories.com/f/software-engineering-architecture/inversion-of-control-containers.md) — Provides a central container for bean instantiation, scope management, and resolution of circular dependencies. ([source](https://github.com/DerekYRC/mini-spring/blob/main/README_en.md))
- [Annotated Class Discovery](https://awesome-repositories.com/f/software-engineering-architecture/annotated-class-discovery.md) — Implements automated discovery of managed objects by scanning packages for specific annotations.
- [Annotation-Based Component Scanning](https://awesome-repositories.com/f/software-engineering-architecture/annotation-based-component-scanning.md) — Automatically discovers and registers managed objects by scanning specified Java packages for annotations. ([source](https://github.com/DerekYRC/mini-spring/blob/main/README_en.md))
- [Bean Definition Configurations](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/hierarchical-configuration-systems/bean-definition-hierarchies/bean-definition-configurations.md) — Supports defining bean metadata and relationships through XML configurations and annotations.
- [Aspect-Oriented Programming Frameworks](https://awesome-repositories.com/f/software-engineering-architecture/aspect-oriented-programming-frameworks.md) — Provides an AOP framework to modularize cross-cutting concerns like logging and security. ([source](https://github.com/DerekYRC/mini-spring/blob/main/README_en.md))
- [Automated Component Discovery](https://awesome-repositories.com/f/software-engineering-architecture/automated-component-discovery.md) — Automatically detects and registers annotated classes from packages to eliminate manual instantiation.
- [Dependency Injection Frameworks](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-frameworks.md) — Provides a lightweight Java dependency injection framework for managing component wiring and lifecycles.
- [Annotation-Based Injection](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/dependency-injection/annotation-based-injection.md) — Resolves and injects required dependencies into fields or constructors using metadata annotations. ([source](https://github.com/DerekYRC/mini-spring/blob/main/README.md))
- [Method Interception Proxies](https://awesome-repositories.com/f/software-engineering-architecture/method-interception-proxies.md) — Uses runtime-generated dynamic proxies to intercept method calls for applying cross-cutting logic.
- [Annotated Class Discovery](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/plugin-module-systems/modular-plugin-architectures/plugin-based-architectures/plugin-based-architectures/annotated-class-discovery.md) — Automatically discovers and registers managed components by scanning annotated classes in specified packages. ([source](https://github.com/DerekYRC/mini-spring/blob/main/README.md))
- [Annotation-Driven Configuration](https://awesome-repositories.com/f/software-engineering-architecture/annotation-driven-configuration.md) — Uses annotations and placeholder resolvers to inject configuration values from property files into beans. ([source](https://github.com/DerekYRC/mini-spring/blob/main/changelog.md))
- [Application Event Buses](https://awesome-repositories.com/f/software-engineering-architecture/application-event-buses.md) — Implements an event-driven architecture to decouple components via a publish-subscribe system. ([source](https://github.com/DerekYRC/mini-spring/blob/main/README_en.md))
- [Bean Post-Processors](https://awesome-repositories.com/f/software-engineering-architecture/bean-post-processors.md) — Process object definitions before instantiation and modify instances before or after their initialization. ([source](https://github.com/DerekYRC/mini-spring/blob/main/changelog_en.md))
- [Property Source Resolvers](https://awesome-repositories.com/f/software-engineering-architecture/dynamic-schema-mapping/component-mappings/runtime-property-resolvers/property-source-resolvers.md) — Resolves configuration placeholders from external property files and classpath resources for injection into beans.
- [Event Bus Systems](https://awesome-repositories.com/f/software-engineering-architecture/event-bus-systems.md) — Provides an internal event bus implementation for decoupled communication between application components.
- [Event Dispatching Systems](https://awesome-repositories.com/f/software-engineering-architecture/event-dispatching-systems.md) — Includes a publish-subscribe multicast system to decouple components via a centralized event dispatcher.
- [Event-Driven Architectures](https://awesome-repositories.com/f/software-engineering-architecture/event-driven-architectures.md) — Implements a publish-subscribe multicast system to decouple components via application-level events.
- [Lifecycle Callbacks](https://awesome-repositories.com/f/software-engineering-architecture/event-driven-callbacks/lifecycle-callbacks.md) — Executes specific initialization and destruction methods to manage resource setup and cleanup for beans. ([source](https://github.com/DerekYRC/mini-spring/blob/main/changelog_en.md))
- [Value Injection Annotations](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/dependency-injection/annotation-driven-injection-systems/value-injection-annotations.md) — Populates object properties using annotations to inject configuration values from external sources. ([source](https://github.com/DerekYRC/mini-spring))

### Development Tools & Productivity

- [Circular Dependency Resolvers](https://awesome-repositories.com/f/development-tools-productivity/dependency-resolvers/bean-resolution-strategies/circular-dependency-resolvers.md) — Utilizes a three-level cache to provide early object references and resolve circular dependencies. ([source](https://github.com/DerekYRC/mini-spring/blob/main/README_en.md))
- [Bean Initialization Customizations](https://awesome-repositories.com/f/development-tools-productivity/data-injection/template-bean-injections/bean-initialization-customizations.md) — Provides post-processors and aware interfaces to inject custom logic before or after bean initialization. ([source](https://github.com/DerekYRC/mini-spring/blob/main/README.md))
- [External Configuration Loading](https://awesome-repositories.com/f/development-tools-productivity/external-configuration-loading.md) — Loads external property files to resolve configuration placeholders without modifying source code. ([source](https://github.com/DerekYRC/mini-spring/blob/main/README.md))

### Programming Languages & Runtimes

- [Java Component Containers](https://awesome-repositories.com/f/programming-languages-runtimes/java-component-containers.md) — Acts as a runtime environment that handles the lifecycle and provisioning of Java objects.
- [Classpath Component Scanners](https://awesome-repositories.com/f/programming-languages-runtimes/partial-class-extensions/external-classpath-extensions/classpath-component-scanners.md) — Automatically discovers and registers managed objects by scanning classpath packages for specific annotations.
- [Scoped Lifecycle Managers](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/language-specific-resources/language-tutorials/c-c-tutorials/object-management/scoped-lifecycle-managers.md) — Supports singleton and prototype scopes to control the visibility and lifecycle of managed objects. ([source](https://github.com/DerekYRC/mini-spring/blob/main/README.md))

### Data & Databases

- [Bean Post-Processor Pipelines](https://awesome-repositories.com/f/data-databases/data-lookup-interfaces/dynamic-bean-lookups/synthetic-bean-factories/bean-post-processor-pipelines.md) — Provides a post-processor pipeline to modify bean definitions and instances during the container initialization phase.

### Networking & Communication

- [Publish-Subscribe Messaging](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/messaging-notification-systems/messaging-services/message-broker-infrastructure/publish-subscribe-messaging.md) — Implements a publish-subscribe pattern for triggering and listening to events within the application context. ([source](https://github.com/DerekYRC/mini-spring/blob/main/changelog_en.md))

### User Interface & Experience

- [Property Placeholders](https://awesome-repositories.com/f/user-interface-experience/component-utilities/ui-frameworks/rendering-models/composition-rendering-patterns/component-patterns/default-property-values/property-placeholders.md) — Injects configuration values into object fields by resolving placeholders using a specific syntax. ([source](https://github.com/DerekYRC/mini-spring/blob/main/changelog_en.md))
- [Application Event Multicasters](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/interaction-and-event-handling/event-handling-architectures/application-event-multicasters.md) — Ships a publish-subscribe system to decouple internal components via event multicasting. ([source](https://github.com/DerekYRC/mini-spring))
