package com.juick.components.configuration; import com.notnoop.apns.APNS; import com.notnoop.apns.ApnsService; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * Created by vital on 28.03.2017. */ @Configuration public class APNSConfiguration { @Value("${ios_pkcs12_file:}") private String pkcs12File; @Value("${ios_pkcs12_password:}") private String pkcs12secret; @Bean public ApnsService apns() { return APNS.newService().withCert(pkcs12File, pkcs12secret) .withProductionDestination().build(); } }