ure will be called every time MyClass2 is used (and return a new object every time)    'MyClass2' => DI\factory(function () {        return new MyClass2();    })->scope(Scope::PROTOTYPE),];```Remember singleton is the default scope. The only exception is when aliasing an entry to another:```phpreturn [    'Foo' => DI\get('Bar'),];```The alias will be cached, instead it will be resolved every time because the target entry (`Bar`) could have the "prototype" scope.### AnnotationYou can specify the scope by using the `@Injectable` annotation on the target class. Remember singleton is the default scope.```php/** * @Injectable(scope="prototype") */class MyService{    // ...}```
吕中楼只手遮天,私吞国资为何安然无事？ 山西沁水县39名退休前在