I have the below code inside the @PostConstruct block in a spring managed code.
class A {
private BoogleFeature boogle;
@PostConstruct
public void createBoggleClient() {
SDKPersona.SDKPersonaBuilder sdkBuilder =
new AppIdentifier.SDKPersonaBuilder()
.setRegistryId(config.getRegistryId())
.setRegistrySecret(config.getRegistrySecret())
boggle = new BoggleFeature(sdkBuilder.build());
}
}
}
Now i want to not do a boggle = new BoggleFeature(sdkBuilder.build()); and make it as bean and inject it as a deopendency . How can i achieve that.