ruwebframe 0.1.9

a simple webframe for rust actix-web, based on rudi and rbatis.
Documentation
// pkg rudi::diexample

/*
	@Title   文件名称: diexample_init.rs
	@Desp    描述:    依赖自动注入
    @Company 公司:    wcht.akunlong.top
	@Author  作者:    raymond@163.com  时间: 2026-08-17 21:44:05
	@Update  作者:    raymond@163.com  时间: 2026-08-17 21:44:05
*/


use std::sync::{Arc, Mutex};
use ctor::ctor;
use crate::rubase::{BaseEntitySingle, BeanSingleton};
use crate::rudi::di_example::DiExample;

#[ctor(unsafe)]
pub fn init() {
    DiExample::register_bean_singleton();
}

pub fn find_bean_di_example() -> Option<Arc<Mutex<DiExample>>> {
    DiExample::find_bean()
}

impl BeanSingleton for DiExample {

    fn new_bean() -> Self {
        let mut bean= DiExample::new();
        bean.init();

        bean
    }
}