Skip to content

Instantly share code, notes, and snippets.

@vladdedita
Last active December 18, 2023 08:13
Show Gist options
  • Save vladdedita/6e95ecceed64e57cb55a8af909d0318b to your computer and use it in GitHub Desktop.
Save vladdedita/6e95ecceed64e57cb55a8af909d0318b to your computer and use it in GitHub Desktop.
@Component
public abstract class SingletonService {
public void usePrototype() {
PrototypeService prototypeService = createPrototypeService();
prototypeService.doSomething();
}
@Lookup
protected abstract PrototypeService createPrototypeService();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment