Initialization failed for ‘https://start.spring.io 解决办法

使用IDEA创建SpringBoot项目时,报错: "Initialization failed for 'https://start.spring.io "

在这里插入图片描述
方法一 : 通过"File | Settings | Appearance & Behavior | System Settings | HTTP Proxy",选中如图方框内容
在这里插入图片描述
点击"check connetion",查看http://start.spring.io是否连接成功
在这里插入图片描述
如果现实连接失败,则尝试下一种方法
在这里插入图片描述
方法二 测试连接"https://start.aliyun.com/"是否成功
在这里插入图片描述
如果测试连接成功,则在创建SpringBoot项目时,选择自定义方式进行创建,输入ali的模板创建SpringBoot项目
在这里插入图片描述

2025.03.17 10:09:36|INFO |org.apache.juli.logging.DirectJDKLog|log()|173|Starting Servlet engine: [Apache Tomcat/9.0.33] 2025.03.17 10:09:36|INFO |org.apache.juli.logging.DirectJDKLog|log()|173|Initializing Spring embedded WebApplicationContext 2025.03.17 10:09:36|INFO |org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext|prepareWebApplicationContext()|284|Root WebApplicationContext: initialization completed in 2729 ms 2025.03.17 10:09:36|DEBUG|io.micrometer.core.util.internal.logging.InternalLoggerFactory|newDefaultFactory()|61|Using SLF4J as the default logging framework 2025.03.17 10:09:36|ERROR|org.springframework.boot.web.embedded.tomcat.TomcatStarter|onStartup()|61|Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributorRegistry]: Factory method 'healthContributorRegistry' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbHealthContributor' defined in class path resource [org/springframework/boot/actuate/autoconfigure/jdbc/DataSourceHealthContributorAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthContributor]: Factory method 'dbHealthContributor' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class 2025.03.17 10:09:36|INFO |org.apache.juli.logging.DirectJDKLog|log()|173|Stopping service [Tomcat] 2025.03.17 10:09:36|WARN |org.springframework.context.support.AbstractApplicationContext|refresh()|558|Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat 2025.03.17 10:09:36|INFO |org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener|logMessage()|136|
最新发布
03-18
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值