From ac2ab39a540273f33c20454b0a175b043c8a31a2 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Mon, 21 Jul 2014 22:22:36 +0100 Subject: [PATCH] Use class name not value to support non-Hibernate JPA vendors With this change I got a simple Eclipselink version of the data-jpa sample working. I'll push that when I get time to research it a bit more (I needed to set up a Java agent so either that might be a problem for our integration tests if we can't work around it). Fixes gh-1268. --- .../boot/autoconfigure/orm/jpa/JpaProperties.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java index a868ce68de3..bc0c8b5034a 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java @@ -116,7 +116,7 @@ public class JpaProperties { private Class namingStrategy; - private static Class DEFAULT_NAMING_STRATEGY = SpringNamingStrategy.class; + private static String DEFAULT_NAMING_STRATEGY = "org.springframework.boot.orm.jpa.SpringNamingStrategy"; private String ddlAuto; @@ -152,7 +152,7 @@ public class JpaProperties { } else if (this.namingStrategy == null) { result.put("hibernate.ejb.naming_strategy", - DEFAULT_NAMING_STRATEGY.getName()); + DEFAULT_NAMING_STRATEGY); } String ddlAuto = getOrDeduceDdlAuto(existing, dataSource); if (StringUtils.hasText(ddlAuto) && !"none".equals(ddlAuto)) {