ruoyi-cloud gatewayWeb application could not be started as there was no org.springframework.boot.web 异常。
16:30:26.042 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 6.2.5.Final
Spring Boot Version: 2.7.7
Spring Application Name: guoziwei-gateway
_ _
(_) | |
_ __ _ _ ___ _ _ _ ______ __ _ __ _ | |_ ___ __ __ __ _ _ _
| '__|| | | | / _ \ | | | || ||______| / _` | / _` || __| / _ \\ \ /\ / / / _` || | | |
| | | |_| || (_) || |_| || | | (_| || (_| || |_ | __/ \ V V / | (_| || |_| |
|_| \__,_| \___/ \__, ||_| \__, | \__,_| \__| \___| \_/\_/ \__,_| \__, |
__/ | __/ | __/ |
|___/ |___/ |___/
16:30:27.088 [main] INFO c.a.n.c.r.client - [lambda$createClient$0,80] - [RpcClientFactory] create a new rpc client of ca0758e3-b2de-41c6-8469-81fd24c9cb8a_config-0
16:30:27.150 [main] INFO o.r.Reflections - [scan,232] - Reflections took 40 ms to scan 1 urls, producing 3 keys and 6 values
16:30:27.183 [main] INFO o.r.Reflections - [scan,232] - Reflections took 18 ms to scan 1 urls, producing 4 keys and 9 values
16:30:27.209 [main] INFO o.r.Reflections - [scan,232] - Reflections took 23 ms to scan 1 urls, producing 3 keys and 10 values
16:30:27.420 [main] INFO o.r.Reflections - [scan,232] - Reflections took 208 ms to scan 252 urls, producing 0 keys and 0 values
16:30:27.433 [main] INFO o.r.Reflections - [scan,232] - Reflections took 12 ms to scan 1 urls, producing 1 keys and 5 values
16:30:27.447 [main] INFO o.r.Reflections - [scan,232] - Reflections took 12 ms to scan 1 urls, producing 1 keys and 7 values
16:30:27.460 [main] INFO o.r.Reflections - [scan,232] - Reflections took 11 ms to scan 1 urls, producing 2 keys and 8 values
16:30:27.631 [main] INFO o.r.Reflections - [scan,232] - Reflections took 168 ms to scan 252 urls, producing 0 keys and 0 values
16:30:27.632 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [ca0758e3-b2de-41c6-8469-81fd24c9cb8a_config-0] RpcClient init label, labels = {module=config, Vipserver-Tag=null, source=sdk, Amory-Tag=null, Location-Tag=null, taskId=0, AppName=unknown}
16:30:27.633 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [ca0758e3-b2de-41c6-8469-81fd24c9cb8a_config-0] Register server push request handler:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$$Lambda$335/609825180
16:30:27.633 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [ca0758e3-b2de-41c6-8469-81fd24c9cb8a_config-0] Register server push request handler:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$$Lambda$336/268086000
16:30:27.634 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [ca0758e3-b2de-41c6-8469-81fd24c9cb8a_config-0] Registry connection listener to current client:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$1
16:30:27.635 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [ca0758e3-b2de-41c6-8469-81fd24c9cb8a_config-0] RpcClient init, ServerListFactory = com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$2
16:30:27.642 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [ca0758e3-b2de-41c6-8469-81fd24c9cb8a_config-0] Try to connect to server on start up, server: {serverIp = '127.0.0.1', server main port = 8848}
16:30:29.238 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [ca0758e3-b2de-41c6-8469-81fd24c9cb8a_config-0] Success to connect to server [127.0.0.1:8848] on start up, connectionId = 1689582629010_127.0.0.1_56851
16:30:29.238 [com.alibaba.nacos.client.remote.worker] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [ca0758e3-b2de-41c6-8469-81fd24c9cb8a_config-0] Notify connected event to listeners.
16:30:29.238 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [ca0758e3-b2de-41c6-8469-81fd24c9cb8a_config-0] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$ConnectResetRequestHandler
16:30:29.239 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [ca0758e3-b2de-41c6-8469-81fd24c9cb8a_config-0] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$$Lambda$345/2078470810
16:30:29.300 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[guoziwei-gateway] & group[DEFAULT_GROUP]
16:30:29.305 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[guoziwei-gateway.properties] & group[DEFAULT_GROUP]
16:30:29.308 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[guoziwei-gateway-dev.properties] & group[DEFAULT_GROUP]
16:30:29.314 [main] INFO c.g.g.GuoZiWeiGatewayApplication - [logStartupProfileInfo,637] - The following 1 profile is active: "dev"
16:30:31.121 [main] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - [refresh,591] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.context.MissingWebServerFactoryBeanException: No qualifying bean of type 'org.springframework.boot.web.servlet.server.ServletWebServerFactory' available: Unable to start AnnotationConfigServletWebServerApplicationContext due to missing ServletWebServerFactory bean
16:30:31.169 [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter - [report,40] -
***************************
APPLICATION FAILED TO START
***************************
Description:
Web application could not be started as there was no org.springframework.boot.web.servlet.server.ServletWebServerFactory bean defined in the context.
Action:
Check your application's dependencies for a supported servlet web server.
Check the configured web application type.
16:30:31.171 [Thread-12] WARN c.a.n.c.n.NotifyCenter - [shutdown,136] - [NotifyCenter] Start destroying Publisher
16:30:31.171 [Thread-12] WARN c.a.n.c.n.NotifyCenter - [shutdown,153] - [NotifyCenter] Destruction of the end
16:30:31.171 [Thread-6] WARN c.a.n.c.h.HttpClientBeanHolder - [shutdown,108] - [HttpClientBeanHolder] Start destroying common HttpClient
16:30:31.171 [Thread-6] WARN c.a.n.c.h.HttpClientBeanHolder - [shutdown,114] - [HttpClientBeanHolder] Destruction of the end
Disconnected from the target VM, address: '127.0.0.1:56772', transport: 'socket'
Process finished with exit code 1
添加如下配置尝试
spring:
main:
web-application-type: REACTIVE
要检查配置的Spring Boot网关应用程序类型,您可以打开application.properties
或application.yml
文件,并查找以下属性:
spring:
main:
web-application-type: <type>
<type>
的值将指示您配置的Web应用程序类型。它可以是以下之一:
SERVLET
:适用于传统的基于Servlet的Web应用程序。REACTIVE
:适用于响应式Web应用程序,使用Spring WebFlux框架。
请注意,这只是一种常见的配置方法,实际的配置可能会因项目而异。