0

Getting below error after migration of my spring batch application to spring boot 3. We are not using any database so cannot provide the datasource connection. Is there any solution for this?

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'dataSource' available
  • 1
    Use embedded H2. Needed by Spring Batch to store the metadata, the map based implementations have been removed. Which is explained in the upgrade guide which I assume you did (not) read... – M. Deinum Aug 02 '23 at 09:20

1 Answers1

0

If you are not using any classes from datasource dependency then you should remove the dependency from pom.xml if maven or from gradle file if gradle.

And If you are using some classes and can't remove the dependency then you should exclude auto configuration for data source for which you can follow this article