//场景:让require.config配置文件成一个公共文件,每个页面引用这个公共配置 //方式一样例: require.config({ baseUrl: (function () { var pathName = document.location.pathname; var index = pathName.substr(1).indexOf("assets/"); var result = pathName.substr(0, index + 1); return resul
Spring Boot 公共配置,配置 application.properties/application.yml 文件中. 摘自:http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html # =================================================================== # COMMON SPRING
自动化通过rcp client调用远端服务接口时,都需要将远端测试服务ip.端口记录在配置文件. 但由于,服务发布或重启会导致ip.端口变动. 以下将通过python-consul 自动去读取consul配置,获取相应服务的ip.port import consul #connect consul c = consul.Consul(host='10.1.x.x',port=8500,scheme='http') data = c.catalog.service('xxxxme.srv.acco