在我的spring boot应用程序中,我发出一个https(secure)请求。为此,我需要将流动参数作为JVM参数传递。
javax.net.ssl.trustStore javax.net.ssl.trustStorePassword
例如:
-Djavax.net.ssl.trustStore=~/home/dinusha/keystore.jks -Djavax.net.ssl.trustStorePassword=pass
在PCF(Cloud Foundry)中,我无法将keystore.jks文件复制到PCF。那么如何在PCF上传递此值
您必须将 keystore.jks 文件与应用程序捆绑在一起。请找到下面的步骤。
client.ssl.trust-store = keystore.jks client.ssl.trust-password =通过
@value(“ $ {client.ssl.trust-password}”) 私有字符串trustPassword @value (“ $ {client.ssl.trust-store}”) 私有字符串trustStore
@value(“ $ {client.ssl.trust-password}”) 私有字符串trustPassword @value
(“ $ {client.ssl.trust-store}”) 私有字符串trustStore
System.setProperty(“ javax.net.ssl.trustStore”,trustStore); System.setProperty(“ javax.net.ssl.trustStorePassword”,trustPassword);