Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 6290ad0

Browse files
committed
Do not set native image system property in NativeListener
Closes gh-1625
1 parent 9caafa6 commit 6290ad0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

spring-native/src/main/java/org/springframework/nativex/NativeListener.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ public class NativeListener implements ApplicationListener<ApplicationEnvironmen
3737
private static final Log logger = LogFactory.getLog(NativeListener.class);
3838

3939
static {
40-
if (!NativeDetector.inNativeImage()) {
41-
System.setProperty("org.graalvm.nativeimage.imagecode", "runtime");
42-
}
43-
if (ClassUtils.isPresent("org.hibernate.Session", null)) {
40+
if (NativeDetector.inNativeImage() && ClassUtils.isPresent("org.hibernate.Session", null)) {
4441
System.setProperty("hibernate.bytecode.provider", "none");
4542
}
4643
}

0 commit comments

Comments
 (0)