java - Spring AsyncResttemplate HTTPs (SSL) service call -


i using spring asyncresttempate call multiple services simultaneously. services exposed via ssl. please let me know how use ssl certificate , asyncresttemplate call services asynchronously? can use resttemplate httpconnectionfactory, how same asyncresttemplate.

i using spring 4.3, jdk 8.

you can use asyncclienthttprequestfactory:

        closeablehttpasyncclient httpclient = httpasyncclients.custom()               .setsslhostnameverifier(sslconnectionsocketfactory.allow_all_hostname_verifier)                   .setsslcontext(getsslcontext(keystore)).build();          asyncclienthttprequestfactory reqfactory =               new httpcomponentsasyncclienthttprequestfactory(httpclient);         asyncresttemplate resttemplate = new asyncresttemplate(reqfactory); 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -