我正在使用STS,在创建一个新的spring-boot项目时,它显示了以下错误:我尝试了两个选项,但没有工作。
选项-1:
Service URL:https://start.spring.io
Error Message: SunCertPathBuilderException: unable to find valid certification path to requested target
我按照指示行事,但没有起作用
Export the corporate certificate (There may be other easier ways of doing this)
On Chrome, I went to https://start.spring.io
On the location bar clicked on the 'Lock' symbol next to https.
Selected 'Certificate(Valid)' on the ensuing pop-up.
On the resulting dialog box, clicked on the 'Certificate Path' tab, from under certificate path tree selected the root node, and then clicked on 'View Certificate'
On the resulting dialog box, clicked on the 'Details' tab and then clicked on 'Copy to File'
This brings up the 'Export wizard', clicked on 'Next'.
Left the certificate format to default 'DER encoded..', clicked on 'Next'.
Provided file name (.cer extension) for the certificate.
Clicked Finish.
The above steps exported a certificate to a file that I imported into truststore (cacerts).
To import
Opened a 'Command' prompt as Administrator to import the certificate
Went to bin directory of Java installation (this step is not needed if jre/bin is in your path)
Ran the following:
C:\Program Files\Java\jre1.8.0_271\bin>keytool -importcert -alias your-alias -keystore "C:\Program Files\Java\jre1.8.0_271\lib\security\cacerts" -storepass changeit -file C:\certificate-file-location\saved-certificate-file.cer
(Substitute your java location, certificate file location and certificate file name as appropriate. The 'storepass' should be 'changeit'.)
Restarted STS
我也尝试了下面的选项,但没有起作用
在STS.ini文件中更新下面的属性并重新启动STS,但没有使用
-Djavax.net.ssl.trustStore=C:\Program Files\Java\jdk\jre1.8.0_271\lib\security\cacerts
-Djava.net.ssl.trustStorePassword=changeit
选项-2:
Service URL:http://start.spring.io
Error Message: JSONException: A JSONObject text must begin with '{' at character 1
注:我也是公司代理的幕后推荐人。
我尝试了所有的网络连接选项,也像:手动,DIrect和本机不使用
当前STS版本:3.8.4
发布于 2022-06-27 04:47:22
请阅读本声明从春季团队这里。
正如你在问题中提到的
当前STS版本:3.8.4
但根据声明,他们正在放弃维护和支持spring工具套件的旧版本(3.x),目前只支持4.x版本
如果您使用eclipse作为套件的平台,那么您可能会使用与spring套件3.x不兼容的eclipse新版本
因此,如果您希望从现在开始使用工具套件,则需要升级到此版本。
https://stackoverflow.com/questions/72703659
复制相似问题