Skip to content

v0.0.5

Latest

Choose a tag to compare

@zooshee zooshee released this 15 Aug 07:21
· 3 commits to main since this release
58dc969

Added

  • ApplicationContext Module: Complete application context management system

    • ApplicationContext and ApplicationContextBuilder for unified application lifecycle management
    • Event-driven context initialization with ContextInitializingEvent and ContextInitializedEvent
    • Configuration change events with ConfigurationChangedEvent
    • Context-aware event listeners supporting dependency injection during event handling
  • Auto-Configuration System: Automatic configuration loading and component assembly

    • #[derive(Configuration)] macro for automatic configuration struct registration
    • Multi-format configuration file support (YAML, TOML, Properties)
    • Hierarchical configuration resolution with precedence rules
    • Configuration hot-reloading capabilities
  • Default Value Support: Flexible default value mechanisms

    • #[config_default(value)] attribute for literal default values
    • #[config_default_t(expression)] attribute for expression-based defaults
    • Support for complex default value calculations at compile time
  • Enhanced Event System: Comprehensive event broadcasting infrastructure

    • Regular event listeners (EventListener<T>)
    • Context-aware event listeners (ContextAwareEventListener<T>)
    • Event publisher with type-safe event handling
    • Built-in lifecycle events for application context management
  • Configuration Management: Advanced configuration handling capabilities

    • ConfigManager with caching and invalidation support
    • Multiple configuration source support with precedence
    • Runtime configuration updates via set_config()
    • Environment variable integration

Enhanced

  • IoC Container Integration: Seamless integration between IoC container and application context

    • Components can now be accessed through both container and context
    • Automatic component registration during context initialization
    • Enhanced dependency resolution with configuration support
  • Component Factory System: Improved component discovery and registration

    • Automatic discovery of Configuration components
    • Integration with inventory crate for compile-time registration
    • Enhanced component lifecycle management

Technical Improvements

  • Thread Safety: All context and configuration operations are thread-safe
  • Performance: Optimized configuration caching and lazy loading
  • Error Handling: Comprehensive error types for context and configuration operations
  • Memory Management: Efficient use of Arc<T> for shared component instances

Documentation

  • Comprehensive Examples: Updated examples showcasing ApplicationContext usage
  • API Documentation: Complete documentation for all public APIs
  • Quick Start Guide: Modern ApplicationContext-first approach in documentation
  • Migration Guide: Clear examples of both traditional IoC and modern ApplicationContext patterns

Breaking Changes

  • None. This release maintains full backward compatibility with v0.0.1

Dependencies

  • Updated minimum supported version documentation
  • Continued dependency on inventory crate for component discovery