配置文件定义静态变量配置文件定义静态变量

1.core==>project.properties:

    change.password.code.clientId=smartedit

2.**Constants.java:

 public class ChangePwd{
    public static final String CLIENTID = "change.password.code.clientId";
 }

3.自己的方法:

//从配置文件中获取clientID
final String clientId = Config.getString(**Constants.ChangePwd.CLIENTID,"smartedit");

猜你喜欢

转载自www.cnblogs.com/shaun-sheng/p/9454247.html