当Spring的RestTemplate做请求时,java.security.NoSuchAlgorithmException

时间:2017-02-17 12:07:08

标签: java spring rest ssl

我试图通过我的网络应用程序向Facebook,Google等外部API请求。 Tomcat使用SSEngine在本机APR上工作。这是连接器配置:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for zyneframework/core dev-master -> satisfiable by zyneframework/core[dev-master].
    - zyneframework/core dev-master requires zyneframework/core-min dev-master -> satisfiable by zyneframework/core-min[dev-master] but these conflict with your requirements or minimum-stability.

我自己的休息api工作得很好,但每次我通过restTemplate向外部服务请求我都会收到这些错误。

这是一个堆栈跟踪:

<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
        maxConnections="5000" maxThreads="5000" processorCache="6000"
        minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" disableUploadTimeout="true"
        acceptCount="5000" debug="0"            
        scheme="https" secure="true" SSLEnabled="true"
        SSLCertificateFile="{....}.crt"
        SSLCertificateKeyFile="{....}.key"
        SSLVerifyClient="optional" SSLProtocol="TLSv1+TLSv1.1+TLSv1.2"/>

如何避免它?

1 个答案:

答案 0 :(得分:0)

默认情况下,java 8仅支持TLS v1.2。如果您尝试连接的站点没有,则会出现此错误。