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
Post a Comment