Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[PojoFactoryWithDI] #java #spring
import org.springframework.stereotype.Component;
import lombok.RequiredArgsConstructor;
@Component
@RequiredArgsConstructor
class AFactory {
private final AComponent aComponent;
private final BComponent bComponent;
public APowered createInstance(AEntity aEntity) {
return new APowered(aEntity, aComponent, bComponent);
}
}
@elegantcoder

This comment has been minimized.

Copy link
Owner Author

@elegantcoder elegantcoder commented Jul 1, 2020

Hello Spring, DI, Java World.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment