Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何覆盖配置文件中的值 #57

Open
Woffee opened this issue May 28, 2019 · 0 comments
Open

如何覆盖配置文件中的值 #57

Woffee opened this issue May 28, 2019 · 0 comments

Comments

@Woffee
Copy link

Woffee commented May 28, 2019

服务器在美国,调用国内云片服务器会有很大延迟。使用jar包或maven可以如下覆盖配置项:

import java.util.Properties;
// ..........

Properties prop = new Properties();
prop.setProperty("yp.user.host","https://us.yunpian.com");
prop.setProperty("yp.sign.host","https://us.yunpian.com");
prop.setProperty("yp.tpl.host","https://us.yunpian.com");
prop.setProperty("yp.sms.host","https://us.yunpian.com");
prop.setProperty("yp.short_url.host","https://us.yunpian.com");

//初始化clnt,使用单例方式
YunpianClient clnt = new YunpianClient("5dd0287******apikey*****900441", prop).init();
@Woffee Woffee closed this as completed May 28, 2019
@Woffee Woffee reopened this Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant