You may use dependency hooks to modify the instances when they are requested from the container. Hooks can modify the properties of the dependency, or even replace the instance with another one.
@ServiceclassMyService {privateint value =5;}voiduseHooks() {Container.addHook("MY_HOOK", (service, container) -> {// override the default value of `5` to `10`service.value=10;return service; });MyService service =Container.get(MyService.class);assertservice.value==10;}