小编Vij*_*tia的帖子

ApplicationContextException:由于缺少ServletWebServerFactory bean,无法启动ServletWebServerApplicationContext

我使用Spring启动编写了一个Spring批处理应用程序.当我尝试在本地系统上使用命令行和类路径运行该应用程序时,它运行正常.但是,当我试图在Linux服务器上运行它时,它给了我以下异常

Unable to start web server; nested exception is
org.springframework.context.ApplicationContextException: 
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Run Code Online (Sandbox Code Playgroud)

以下是我运行它的方式:

java -cp jarFileName.jar; lib\* -Dlogging.level.org.springframework=DEBUG -Dspring.profiles.active=dev -Dspring.batch.job.names=abcBatchJob com.aa.bb.StartSpringBatch > somelogs.log
Run Code Online (Sandbox Code Playgroud)

spring spring-batch spring-boot

25
推荐指数
9
解决办法
6万
查看次数

标签 统计

spring ×1

spring-batch ×1

spring-boot ×1