【转载】springboot启动报错(Unable to start web server; nested exception is ...

时间:2024-10-22 18:09:43
1 "C:\Program Files\Java\jdk1.8.0_161\bin\java" ......... 2 hello world 3 4 . ____ _ __ _ _ 5 /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ 6 ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ 7 \\/ ___)| |_)| | | | | || (_| | ) ) ) ) 8 ' |____| .__|_| |_|_| |_\__, | / / / / 9 =========|_|==============|___/=/_/_/_/ 10 :: Spring Boot :: (v2.0.) 11 12 2018-04-03 22:25:07.232 INFO 4976 --- [ main] : Starting ComponentScanApp on DESKTOP-BHGM3HS with PID 4976 (started by hasee in D:\test\projects\java-learning) 13 2018-04-03 22:25:07.237 INFO 4976 --- [ main] : No active profile set, falling back to default profiles: default 14 2018-04-03 22:25:07.321 INFO 4976 --- [ main] ConfigServletWebServerApplicationContext : Refreshing @45f45fa1: startup date [Tue Apr 03 22:25:07 CST 2018]; root of context hierarchy 15 2018-04-03 22:25:07.664 WARN 4976 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: : Unable to start web server; nested exception is : Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean. 16 2018-04-03 22:25:08.238 ERROR 4976 --- [ main] : Application run failed 17 18 : Unable to start web server; nested exception is : Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean. 19 at (:155) ~[spring-boot-2.0.:2.0.] 20 at (:543) ~[spring-context-5.0.:5.0.] 21 at (:140) ~[spring-boot-2.0.:2.0.] 22 at (:752) [spring-boot-2.0.:2.0.] 23 at (:388) [spring-boot-2.0.:2.0.] 24 at (:327) [spring-boot-2.0.:2.0.] 25 at (:1246) [spring-boot-2.0.:2.0.] 26 at (:1234) [spring-boot-2.0.:2.0.] 27 at (:15) [classes/:na] 28 Caused by: : Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean. 29 at (:204) ~[spring-boot-2.0.:2.0.] 30 at (:178) ~[spring-boot-2.0.:2.0.] 31 at (:152) ~[spring-boot-2.0.:2.0.] 32 ... 8 common frames omitted 33 34 35 Process finished with exit code 1