在配置中如果需要使用特定的Maven配置属性(maven私服,代理或者其他)或者运行一个需要代理的Data Flow 服务,你需要在启动服务的时候配置对应属性作为启动命令,如下:
$ java -jar spring-cloud-dataflow-server-2.1.0.RELEASE.jar \
--spring.config.additional-location=/home/joe/maven.yml &
maven:
localRepository: mylocal
remote-repositories:
repo1:
url: https://repo1
auth:
username: user1
password: pass1
snapshot-policy:
update-policy: daily
checksum-policy: warn
release-policy:
update-policy: never
checksum-policy: fail
repo2:
url: https://repo2
policy:
update-policy: always
checksum-policy: fail
proxy:
host: proxy1
port: "9010"
auth:
username: proxyuser1
password: proxypass1
$ SPRING_APPLICATION_JSON='{ "maven": { "local-repository": null,
"remote-repositories": { "repo1": { "url": "https://repo1", "auth": { "username": "repo1user", "password": "repo1pass" } }, "repo2": { "url": "https://repo2" } },
"proxy": { "host": "proxyhost", "port": 9018, "auth": { "username": "proxyuser", "password": "proxypass" } } } }' java -jar spring-cloud-dataflow-server-2.1.0.RELEASE.jar