Skip to content

Commit ac2ab39

Browse files
author
Dave Syer
committed
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 spring-projectsgh-1268.
1 parent 99b3240 commit ac2ab39

File tree

1 file changed

+2
-2
lines changed
  • spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa

1 file changed

+2
-2
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public static class Hibernate {
116116

117117
private Class<?> namingStrategy;
118118

119-
private static Class<?> DEFAULT_NAMING_STRATEGY = SpringNamingStrategy.class;
119+
private static String DEFAULT_NAMING_STRATEGY = "org.springframework.boot.orm.jpa.SpringNamingStrategy";
120120

121121
private String ddlAuto;
122122

@@ -152,7 +152,7 @@ private Map<String, String> getAdditionalProperties(Map<String, String> existing
152152
}
153153
else if (this.namingStrategy == null) {
154154
result.put("hibernate.ejb.naming_strategy",
155-
DEFAULT_NAMING_STRATEGY.getName());
155+
DEFAULT_NAMING_STRATEGY);
156156
}
157157
String ddlAuto = getOrDeduceDdlAuto(existing, dataSource);
158158
if (StringUtils.hasText(ddlAuto) && !"none".equals(ddlAuto)) {

0 commit comments

Comments
 (0)