【踩坑】SpringBoot项目启动时报错

前言

SpringBoot项目启动时报错:class path resource [org/springframework/batch/core/configuration/support/DefaultBatchConfiguration.class] cannot be opened because it does not exist

解决问题

  • 排除Batch自动配置

  • Application.java的入口类上添加排除配置

1
2
@SpringBootApplication(exclude = [BatchAutoConfiguration::class])
public class Application {}

完成