All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.minsin.core.init.DianWoDaConfig Maven / Gradle / Ivy

Go to download

mutils-core 作为mutils组件中的核心模块。 可以被maven项目单独引用,引入后可提供多种帮助类,如StringUtil、NumberUtil、DateUtil等等 maven仓库:https://mvnrepository.com/artifact/cn.minsin/mutils-core

There is a newer version: 0.3.7
Show newest version
package cn.minsin.core.init;

import cn.minsin.core.exception.MutilsException;
import cn.minsin.core.init.core.AbstractConfig;
import cn.minsin.core.tools.StringUtil;

/**
 * 	点我达配置文件
 * @author mintonzhang
 * @date 2019年2月14日
 * @since 0.1.0
 */
public class DianWoDaConfig extends AbstractConfig {

	
	/**
	 * 	正式服 http://api.dianwoda.com
	 * 	测试服 http://docking-normal-qa.dwbops.com 默认
	 */
	private String url="http://docking-normal-qa.dwbops.com";
	
	private String pk;
	
	private String version = "1.0.0";
	
	private String sercret;
	
	private String format ="json";
	
	public Long getTimestamp() {
		return System.currentTimeMillis()/1000;
	}

	public String getUrl() {
		return url;
	}


	public void setUrl(String url) {
		this.url = url;
	}



	public String getPk() {
		return pk;
	}



	public void setPk(String pk) {
		this.pk = pk;
	}



	public String getVersion() {
		return version;
	}



	public void setVersion(String version) {
		this.version = version;
	}



	public String getSercret() {
		return sercret;
	}



	public void setSercret(String sercret) {
		this.sercret = sercret;
	}



	public String getFormat() {
		return format;
	}



	public void setFormat(String format) {
		this.format = format;
	}

	@Override
	protected void checkConfig() {
		slog.info("Required for initialization url, pk, secret.");
		if(StringUtil.isBlank(url,pk,sercret)){
			throw new MutilsException("点我达  初始化失败,请检查配置文件是否正确.");
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy