QubitPi opened a new issue #6634: Dependency Injection in DruidModule extension URL: https://github.com/apache/incubator-druid/issues/6634 We are writing a custom registered lookup module. We have an object like this ```java public class Foo { @Inject // Guice inject Foo(@PayPal CreditCardProcessor processor) { ... } } ``` We are using binding annotation to bind `CreditCardProcessor` type to `PayPalCreditCardProcessor`. But our `CreditCardProcessor` is created via Jackson binding ```java public class PayPalCreditCardProcessor implements CreditCardProcessor { @JsonCreator PayPalCreditCardProcessor(@JsonProperty("cardNumber") String cardNumber) { ... } } ``` How do we make this dependency graph happen? Looks like for Guice to traverse dependency graph down to `PayPalCreditCardProcessor`, I had to bind it with Guice annotation like this ```java @Inject // Guice inject @JsonCreator PayPalCreditCardProcessor(@JsonProperty("cardNumber") String cardNumber) { ... } ``` But when I did that, it asked for a instance binding for `cardNumber` which seems to be impossible via Jackson binding. Am I wrong? How do I make dependency injection start with Guice binding and have a terminal injection via Jackson?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
