org.springframework.context.ApplicationContextException: Unable to start ServletWe

D:\jdk15\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:55457,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath "G:\projects\Server\guigu-ssyx-parent\service\service-acl\target\classes;D:\Maven\org\springframework\boot\spring-boot-starter-web\2.3.6.RELEASE\spring-boot-starter-web-2.3.6.RELEASE.jar;D:\Maven\org\springframework\boot\spring-boot-starter\2.3.6.RELEASE\spring-boot-starter-2.3.6.RELEASE.jar;D:\Maven\org\springframework\boot\spring-boot-starter-logging\2.3.6.RELEASE\spring-boot-starter-logging-2.3.6.RELEASE.jar;D:\Maven\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\Maven\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\Maven\org\apache\logging\log4j\log4j-to-slf4j\2.13.3\log4j-to-slf4j-2.13.3.jar;D:\Maven\org\apache\logging\log4j\log4j-api\2.13.3\log4j-api-2.13.3.jar;D:\Maven\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;D:\Maven\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\Maven\org\springframework\spring-core\5.2.11.RELEASE\spring-core-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-jcl\5.2.11.RELEASE\spring-jcl-5.2.11.RELEASE.jar;D:\Maven\org\yaml\snakeyaml\1.26\snakeyaml-1.26.jar;D:\Maven\org\springframework\boot\spring-boot-starter-json\2.3.6.RELEASE\spring-boot-starter-json-2.3.6.RELEASE.jar;D:\Maven\com\fasterxml\jackson\core\jackson-databind\2.11.3\jackson-databind-2.11.3.jar;D:\Maven\com\fasterxml\jackson\core\jackson-annotations\2.11.3\jackson-annotations-2.11.3.jar;D:\Maven\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.11.3\jackson-datatype-jdk8-2.11.3.jar;D:\Maven\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.11.3\jackson-datatype-jsr310-2.11.3.jar;D:\Maven\com\fasterxml\jackson\module\jackson-module-parameter-names\2.11.3\jackson-module-parameter-names-2.11.3.jar;D:\Maven\org\springframework\boot\spring-boot-starter-tomcat\2.3.6.RELEASE\spring-boot-starter-tomcat-2.3.6.RELEASE.jar;D:\Maven\org\apache\tomcat\embed\tomcat-embed-core\9.0.39\tomcat-embed-core-9.0.39.jar;D:\Maven\org\glassfish\jakarta.el\3.0.3\jakarta.el-3.0.3.jar;D:\Maven\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.39\tomcat-embed-websocket-9.0.39.jar;D:\Maven\org\springframework\spring-web\5.2.11.RELEASE\spring-web-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-beans\5.2.11.RELEASE\spring-beans-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-webmvc\5.2.11.RELEASE\spring-webmvc-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-aop\5.2.11.RELEASE\spring-aop-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-context\5.2.11.RELEASE\spring-context-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-expression\5.2.11.RELEASE\spring-expression-5.2.11.RELEASE.jar;G:\projects\Server\guigu-ssyx-parent\common\service-util\target\classes;D:\Maven\org\apache\httpcomponents\httpclient\4.5.1\httpclient-4.5.1.jar;D:\Maven\org\apache\httpcomponents\httpcore\4.4.13\httpcore-4.4.13.jar;D:\Maven\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;D:\Maven\commons-codec\commons-codec\1.14\commons-codec-1.14.jar;D:\Maven\io\jsonwebtoken\jjwt\0.7.0\jjwt-0.7.0.jar;D:\Maven\joda-time\joda-time\2.10.1\joda-time-2.10.1.jar;D:\Maven\org\springframework\boot\spring-boot-starter-data-redis\2.3.6.RELEASE\spring-boot-starter-data-redis-2.3.6.RELEASE.jar;D:\Maven\org\springframework\data\spring-data-redis\2.3.5.RELEASE\spring-data-redis-2.3.5.RELEASE.jar;D:\Maven\org\springframework\data\spring-data-keyvalue\2.3.5.RELEASE\spring-data-keyvalue-2.3.5.RELEASE.jar;D:\Maven\org\springframework\data\spring-data-commons\2.3.5.RELEASE\spring-data-commons-2.3.5.RELEASE.jar;D:\Maven\org\springframework\spring-tx\5.2.11.RELEASE\spring-tx-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-oxm\5.2.11.RELEASE\spring-oxm-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-context-support\5.2.11.RELEASE\spring-context-support-5.2.11.RELEASE.jar;D:\Maven\io\lettuce\lettuce-core\5.3.5.RELEASE\lettuce-core-5.3.5.RELEASE.jar;D:\Maven\org\apache\commons\commons-pool2\2.8.1\commons-pool2-2.8.1.jar;D:\Maven\org\redisson\redisson\3.11.2\redisson-3.11.2.jar;D:\Maven\io\netty\netty-common\4.1.54.Final\netty-common-4.1.54.Final.jar;D:\Maven\io\netty\netty-codec\4.1.54.Final\netty-codec-4.1.54.Final.jar;D:\Maven\io\netty\netty-buffer\4.1.54.Final\netty-buffer-4.1.54.Final.jar;D:\Maven\io\netty\netty-transport\4.1.54.Final\netty-transport-4.1.54.Final.jar;D:\Maven\io\netty\netty-resolver\4.1.54.Final\netty-resolver-4.1.54.Final.jar;D:\Maven\io\netty\netty-resolver-dns\4.1.54.Final\netty-resolver-dns-4.1.54.Final.jar;D:\Maven\io\netty\netty-codec-dns\4.1.54.Final\netty-codec-dns-4.1.54.Final.jar;D:\Maven\io\netty\netty-handler\4.1.54.Final\netty-handler-4.1.54.Final.jar;D:\Maven\javax\cache\cache-api\1.1.1\cache-api-1.1.1.jar;D:\Maven\io\projectreactor\reactor-core\3.3.11.RELEASE\reactor-core-3.3.11.RELEASE.jar;D:\Maven\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar;D:\Maven\io\reactivex\rxjava2\rxjava\2.2.20\rxjava-2.2.20.jar;D:\Maven\de\ruedigermoeller\fst\2.57\fst-2.57.jar;D:\Maven\org\javassist\javassist\3.21.0-GA\javassist-3.21.0-GA.jar;D:\Maven\org\objenesis\objenesis\2.5.1\objenesis-2.5.1.jar;D:\Maven\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;D:\Maven\com\fasterxml\jackson\dataformat\jackson-dataformat-yaml\2.11.3\jackson-dataformat-yaml-2.11.3.jar;D:\Maven\com\fasterxml\jackson\core\jackson-core\2.11.3\jackson-core-2.11.3.jar;D:\Maven\net\bytebuddy\byte-buddy\1.10.18\byte-buddy-1.10.18.jar;D:\Maven\org\jodd\jodd-bean\5.0.10\jodd-bean-5.0.10.jar;D:\Maven\org\jodd\jodd-core\5.0.10\jodd-core-5.0.10.jar;D:\Maven\org\projectlombok\lombok\1.18.16\lombok-1.18.16.jar;D:\Maven\com\github\xiaoymin\knife4j-spring-boot-starter\2.0.8\knife4j-spring-boot-starter-2.0.8.jar;D:\Maven\com\github\xiaoymin\knife4j-spring-boot-autoconfigure\2.0.8\knife4j-spring-boot-autoconfigure-2.0.8.jar;D:\Maven\com\github\xiaoymin\knife4j-spring\2.0.8\knife4j-spring-2.0.8.jar;D:\Maven\com\github\xiaoymin\knife4j-annotations\2.0.8\knife4j-annotations-2.0.8.jar;D:\Maven\com\github\xiaoymin\knife4j-core\2.0.8\knife4j-core-2.0.8.jar;D:\Maven\io\swagger\swagger-models\1.5.22\swagger-models-1.5.22.jar;D:\Maven\io\swagger\swagger-annotations\1.5.22\swagger-annotations-1.5.22.jar;D:\Maven\io\springfox\springfox-swagger2\2.10.5\springfox-swagger2-2.10.5.jar;D:\Maven\io\springfox\springfox-spi\2.10.5\springfox-spi-2.10.5.jar;D:\Maven\io\springfox\springfox-core\2.10.5\springfox-core-2.10.5.jar;D:\Maven\io\springfox\springfox-schema\2.10.5\springfox-schema-2.10.5.jar;D:\Maven\io\springfox\springfox-swagger-common\2.10.5\springfox-swagger-common-2.10.5.jar;D:\Maven\io\springfox\springfox-spring-web\2.10.5\springfox-spring-web-2.10.5.jar;D:\Maven\io\github\classgraph\classgraph\4.1.7\classgraph-4.1.7.jar;D:\Maven\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;D:\Maven\org\springframework\plugin\spring-plugin-core\2.0.0.RELEASE\spring-plugin-core-2.0.0.RELEASE.jar;D:\Maven\org\springframework\plugin\spring-plugin-metadata\2.0.0.RELEASE\spring-plugin-metadata-2.0.0.RELEASE.jar;D:\Maven\org\mapstruct\mapstruct\1.3.1.Final\mapstruct-1.3.1.Final.jar;D:\Maven\io\springfox\springfox-bean-validators\2.10.5\springfox-bean-validators-2.10.5.jar;D:\Maven\io\springfox\springfox-spring-webmvc\2.10.5\springfox-spring-webmvc-2.10.5.jar;D:\Maven\com\github\xiaoymin\knife4j-spring-ui\2.0.8\knife4j-spring-ui-2.0.8.jar;D:\Maven\com\alibaba\fastjson\2.0.0\fastjson-2.0.0.jar;D:\Maven\com\alibaba\fastjson2\fastjson2-extension\2.0.0\fastjson2-extension-2.0.0.jar;D:\Maven\com\alibaba\fastjson2\fastjson2\2.0.0\fastjson2-2.0.0.jar;G:\projects\Server\guigu-ssyx-parent\model\target\classes;D:\Maven\com\baomidou\mybatis-plus-boot-starter\3.4.1\mybatis-plus-boot-starter-3.4.1.jar;D:\Maven\com\baomidou\mybatis-plus\3.4.1\mybatis-plus-3.4.1.jar;D:\Maven\com\baomidou\mybatis-plus-extension\3.4.1\mybatis-plus-extension-3.4.1.jar;D:\Maven\com\baomidou\mybatis-plus-core\3.4.1\mybatis-plus-core-3.4.1.jar;D:\Maven\com\baomidou\mybatis-plus-annotation\3.4.1\mybatis-plus-annotation-3.4.1.jar;D:\Maven\com\github\jsqlparser\jsqlparser\3.2\jsqlparser-3.2.jar;D:\Maven\org\mybatis\mybatis\3.5.6\mybatis-3.5.6.jar;D:\Maven\org\mybatis\mybatis-spring\2.0.5\mybatis-spring-2.0.5.jar;D:\Maven\org\springframework\boot\spring-boot-autoconfigure\2.3.6.RELEASE\spring-boot-autoconfigure-2.3.6.RELEASE.jar;D:\Maven\org\springframework\boot\spring-boot-starter-jdbc\2.3.6.RELEASE\spring-boot-starter-jdbc-2.3.6.RELEASE.jar;D:\Maven\com\zaxxer\HikariCP\3.4.5\HikariCP-3.4.5.jar;D:\Maven\org\springframework\spring-jdbc\5.2.11.RELEASE\spring-jdbc-5.2.11.RELEASE.jar;D:\Maven\mysql\mysql-connector-java\8.0.12\mysql-connector-java-8.0.12.jar;D:\Maven\com\google\protobuf\protobuf-java\3.12.2\protobuf-java-3.12.2.jar;D:\Maven\com\alibaba\cloud\spring-cloud-starter-alibaba-sentinel\2.2.2.RELEASE\spring-cloud-starter-alibaba-sentinel-2.2.2.RELEASE.jar;D:\Maven\com\alibaba\csp\sentinel-transport-simple-http\1.8.0\sentinel-transport-simple-http-1.8.0.jar;D:\Maven\com\alibaba\csp\sentinel-transport-common\1.8.0\sentinel-transport-common-1.8.0.jar;D:\Maven\com\alibaba\csp\sentinel-datasource-extension\1.8.0\sentinel-datasource-extension-1.8.0.jar;D:\Maven\com\alibaba\csp\sentinel-annotation-aspectj\1.8.0\sentinel-annotation-aspectj-1.8.0.jar;D:\Maven\com\alibaba\csp\sentinel-core\1.8.0\sentinel-core-1.8.0.jar;D:\Maven\org\aspectj\aspectjrt\1.9.6\aspectjrt-1.9.6.jar;D:\Maven\org\aspectj\aspectjweaver\1.9.6\aspectjweaver-1.9.6.jar;D:\Maven\com\alibaba\cloud\spring-cloud-circuitbreaker-sentinel\2.2.2.RELEASE\spring-cloud-circuitbreaker-sentinel-2.2.2.RELEASE.jar;D:\Maven\org\springframework\cloud\spring-cloud-commons\2.2.5.RELEASE\spring-cloud-commons-2.2.5.RELEASE.jar;D:\Maven\org\springframework\security\spring-security-crypto\5.3.5.RELEASE\spring-security-crypto-5.3.5.RELEASE.jar;D:\Maven\com\alibaba\csp\sentinel-reactor-adapter\1.8.0\sentinel-reactor-adapter-1.8.0.jar;D:\Maven\com\alibaba\csp\sentinel-spring-webflux-adapter\1.8.0\sentinel-spring-webflux-adapter-1.8.0.jar;D:\Maven\com\alibaba\csp\sentinel-spring-webmvc-adapter\1.8.0\sentinel-spring-webmvc-adapter-1.8.0.jar;D:\Maven\com\alibaba\csp\sentinel-parameter-flow-control\1.8.0\sentinel-parameter-flow-control-1.8.0.jar;D:\Maven\com\googlecode\concurrentlinkedhashmap\concurrentlinkedhashmap-lru\1.4.2\concurrentlinkedhashmap-lru-1.4.2.jar;D:\Maven\com\alibaba\csp\sentinel-cluster-server-default\1.8.0\sentinel-cluster-server-default-1.8.0.jar;D:\Maven\com\alibaba\csp\sentinel-cluster-common-default\1.8.0\sentinel-cluster-common-default-1.8.0.jar;D:\Maven\com\alibaba\csp\sentinel-cluster-client-default\1.8.0\sentinel-cluster-client-default-1.8.0.jar;D:\Maven\com\alibaba\cloud\spring-cloud-alibaba-sentinel-datasource\2.2.2.RELEASE\spring-cloud-alibaba-sentinel-datasource-2.2.2.RELEASE.jar;D:\Maven\org\springframework\boot\spring-boot-devtools\2.3.6.RELEASE\spring-boot-devtools-2.3.6.RELEASE.jar;D:\Maven\org\springframework\boot\spring-boot\2.3.6.RELEASE\spring-boot-2.3.6.RELEASE.jar;D:\IntelliJ IDEA 2020.3\lib\idea_rt.jar" com.atguigu.ssyx.ServiceAclApplication
Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
已连接到目标 VM, 地址: ''127.0.0.1:55457',传输: '套接字''

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.6.RELEASE)

2023-10-28 19:03:48.560  INFO 16200 --- [  restartedMain] com.atguigu.ssyx.ServiceAclApplication   : Starting ServiceAclApplication on LAPTOP-EB613Q35 with PID 16200 (G:\projects\Server\guigu-ssyx-parent\service\service-acl\target\classes started by 郭国国 in G:\projects\Server\guigu-ssyx-parent)
2023-10-28 19:03:48.562  INFO 16200 --- [  restartedMain] com.atguigu.ssyx.ServiceAclApplication   : The following profiles are active: dev
2023-10-28 19:03:48.575  INFO 16200 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2023-10-28 19:03:48.575  INFO 16200 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2023-10-28 19:03:48.627  WARN 16200 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
2023-10-28 19:03:48.640 ERROR 16200 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:161) ~[spring-boot-2.3.6.RELEASE.jar:2.3.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545) ~[spring-context-5.2.11.RELEASE.jar:5.2.11.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.6.RELEASE.jar:2.3.6.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) ~[spring-boot-2.3.6.RELEASE.jar:2.3.6.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) ~[spring-boot-2.3.6.RELEASE.jar:2.3.6.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405) ~[spring-boot-2.3.6.RELEASE.jar:2.3.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.3.6.RELEASE.jar:2.3.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) ~[spring-boot-2.3.6.RELEASE.jar:2.3.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.3.6.RELEASE.jar:2.3.6.RELEASE]
	at com.atguigu.ssyx.ServiceAclApplication.main(ServiceAclApplication.java:19) ~[classes/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:564) ~[na:na]
	at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.3.6.RELEASE.jar:2.3.6.RELEASE]
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:205) ~[spring-boot-2.3.6.RELEASE.jar:2.3.6.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:177) ~[spring-boot-2.3.6.RELEASE.jar:2.3.6.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:158) ~[spring-boot-2.3.6.RELEASE.jar:2.3.6.RELEASE]
	... 14 common frames omitted

检查启动类:

@SpringBootApplication
public class ServiceAclApplication {
    
    
    public static void main(String[] args) {
    
    
        SpringApplication.run(SpringApplication.class,args);
    }
}

发现写错,应该改为:

@SpringBootApplication
public class ServiceAclApplication {
    
    
    public static void main(String[] args) {
    
    
        SpringApplication.run(ServiceAclApplication .class,args);
    }
}

猜你喜欢

转载自blog.csdn.net/weixin_44749255/article/details/134094868