spring启动-由于缺少EmbeddedServletContainerFactorybean而无法启动EmbeddedWebApplicationContext

spring启动-由于缺少EmbeddedServletContainerFactorybean而无法启动EmbeddedWebApplicationContext,第1张

spring启动-由于缺少EmbeddedServletContainerFactorybean而无法启动EmbeddedWebApplicationContext

我能够启动并运行您的应用程序。为了使它运行,我所做的唯一更改是在build.gradle文件中注释了几个依赖项。

在下面的依存关系块中,注释掉了三行。我之所以删除spring-boot-start-jpa行,是因为我没有配置的dataSource。

但是,如果仅注释掉servlet-api和jstl依赖关系,则您的应用程序应该启动时没有问题,这对我来说确实如此。

dependencies {    //compile('org.springframework.boot:spring-boot-starter-data-jpa')    compile('org.springframework.boot:spring-boot-starter-security')    compile('org.springframework.boot:spring-boot-starter-web')    compile('org.apache.tomcat.embed:tomcat-embed-jasper:8.0.30')    //compile('javax.servlet:servlet-api:2.5')    //compile('javax.servlet:jstl:1.2')    runtime('mysql:mysql-connector-java')    providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'    testCompile('org.springframework.boot:spring-boot-starter-test')}


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5600181.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存