Browse Source

Merge branch '6.0.x'

pull/31076/head
Sébastien Deleuze 1 year ago
parent
commit
11abd8b04f
  1. 8
      spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerRuntimeHints.java

8
spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerRuntimeHints.java

@ -39,6 +39,8 @@ class EntityManagerRuntimeHints implements RuntimeHintsRegistrar { @@ -39,6 +39,8 @@ class EntityManagerRuntimeHints implements RuntimeHintsRegistrar {
private static final String QUERY_SQM_IMPL_CLASS_NAME = "org.hibernate.query.sqm.internal.QuerySqmImpl";
private static final String NATIVE_QUERY_IMPL_CLASS_NAME = "org.hibernate.query.sql.internal.NativeQueryImpl";
@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
if (ClassUtils.isPresent(HIBERNATE_SESSION_FACTORY_CLASS_NAME, classLoader)) {
@ -61,5 +63,11 @@ class EntityManagerRuntimeHints implements RuntimeHintsRegistrar { @@ -61,5 +63,11 @@ class EntityManagerRuntimeHints implements RuntimeHintsRegistrar {
}
catch (ClassNotFoundException ignored) {
}
try {
Class<?> clazz = ClassUtils.forName(NATIVE_QUERY_IMPL_CLASS_NAME, classLoader);
hints.proxies().registerJdkProxy(ClassUtils.getAllInterfacesForClass(clazz, classLoader));
}
catch (ClassNotFoundException ignored) {
}
}
}

Loading…
Cancel
Save