ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

我使用Spring boot编写了一个spring batch应用程序。当我试图用命令行和classpath在本地系统上运行该程序时,它运行得很好。然而,当我试图在linux服务器上运行它时,却出现了以下异常

Unable to start web server; nested exception is
org.springframework.context.ApplicationContextException: 
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.

以下是我的运行方式。

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

StackOverflow:spring - ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean - Stack Overflow