Commit 7b13a0fe by giaogiao

读取系统文件目录 生成apns字符串

parent e5020e24
package io.geekidea.springbootplus.test;
import cn.hutool.core.codec.Base64;
import org.junit.Test;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
/**
* 读取系统文件目录 生成apns字符串
*/
public class ApnsTest {
@Test
public void test() throws Exception {
File file = new File("/Users/giaogiao/Downloads/push_zixun.p12");
InputStream certificate = new FileInputStream(file);
String encode = Base64.encode(certificate);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment