Reputation: 1170
With Java-APNS, they create a service like this:
ApnsService service = APNS.newService() .withCert("C:/temp/myCertificate.p12", "p@ssw0rd") .withSandboxDestination() .build();
ApnsService is a Java Interface.
I'd like to instantiate this service with Spring and inject it in another service, any idea?
Best thanks to you!
Upvotes: 0
Views: 569
Reputation: 308928
You may be able to do it in Spring by designating a factory method in the application context for that bean, but it could be tricky. The Bloch builder idiom is not what Spring had in mind.
Upvotes: 1