blob: 6ac155a114e657637335d6a38d8abfd7a525763b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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();
}
}
|