How to use Play WS with SSL?

前端 未结 3 1679
无人及你
无人及你 2021-02-10 07:13

My Java client application needs to do REST calls. I was instructed to use Play\'s WS implementation. Currently, I have this:

AsyncHttpClientConfig.Builder build         


        
3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-10 07:30

    1. Make sure you have added your Certificate to your trust-store like this:

    keytool -import -trustcacerts -keystore {JAVA_HOME}/jre/lib/security/cacerts -noprompt -alias -file {CORRECT_PATH}/what_ever.crt

    1. If still the problem exists, set the path directly by setting java parameters in your execution command line like this:

    -Djavax.net.ssl.trustStore={JAVA_HOME}/jre/lib/security/cacerts

提交回复
热议问题