diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BasicBatchConfigurer.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BasicBatchConfigurer.java index 28e93449be..93fbc48fb4 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BasicBatchConfigurer.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BasicBatchConfigurer.java @@ -140,6 +140,10 @@ class BasicBatchConfigurer implements BatchConfigurer { logger.warn("JPA does not support custom isolation levels, so locks may not be taken when launching Jobs"); factory.setIsolationLevelForCreate("ISOLATION_DEFAULT"); } + String tablePrefix = this.properties.getTablePrefix(); + if (StringUtils.hasText(tablePrefix)) { + factory.setTablePrefix(tablePrefix); + } factory.setTransactionManager(getTransactionManager()); factory.afterPropertiesSet(); return factory.getObject();