package com.boco.nbd.wios.manage.contants; import com.ihidea.core.support.exception.ServiceException; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; /** * 第三方接口地址常量 * * @author xgl * @version [版本号, 2018年10月17日] */ @Component public class InterfaceAddrConstant { @Value("${url.api.push}") private String pushRequestUrl; @Value("${url.api.invoice}") private String invoiceRequestUrl; public String getArr(int type) { switch (type) { case RpcConstant.SYSTEM_PUSH: return pushRequestUrl; case RpcConstant.SYSTEM_INVOICE: return invoiceRequestUrl; default: throw new ServiceException("未知的接口类型"); } } }