use std::any::Any;
use std::sync::Arc;
pub trait BeanRegistry {
fn register<F, T>(&mut self, key: &str, factory: F)
where
F: Fn() -> T + Send + Sync + 'static,
T: Any + Send + Sync + 'static;
fn register_singleton<F, T>(&mut self, key: &str, factory: F)
where
F: Fn() -> T + Send + Sync + 'static,
T: Any + Send + Sync + 'static;
fn get_bean<T: Any + Send + Sync>(&self, key: &str) -> Option<Arc<T>> ;
}