Spring Boot Batch ResourcelessTransactionManager DataSourceProperties$DataSourceBeanCreationException

后端 未结 2 1913
北荒
北荒 2020-12-12 05:52

I\'m trying to setup a spring boot batch project that uses a ResourcelessTransactionManager transaction manager using Java Configuration, but I\'m having no luc

2条回答
  •  孤城傲影
    2020-12-12 06:04

    Your problem seem to be no data source available in your configuration. Spring Batch needs database so persist its state.

    Spring Boot can automatically configure in memory DB if you have some on classpath. Example application you are referring to has HSQL included in POM here: https://github.com/spring-projects/spring-boot/blob/v1.4.0.RELEASE/spring-boot-samples/spring-boot-sample-batch/pom.xml#L26

    So to fix your problem, define access to your Database.

提交回复
热议问题