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

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -