File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
spring-orm/src/main/java/org/springframework/orm/jpa/vendor Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2016 the original author or authors.
2
+ * Copyright 2002-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
23
23
import jakarta .persistence .EntityManagerFactory ;
24
24
import jakarta .persistence .spi .PersistenceUnitInfo ;
25
25
import org .hibernate .cfg .Configuration ;
26
+ import org .hibernate .cfg .Environment ;
26
27
import org .hibernate .jpa .HibernatePersistenceProvider ;
27
28
import org .hibernate .jpa .boot .internal .EntityManagerFactoryBuilderImpl ;
28
29
import org .hibernate .jpa .boot .internal .PersistenceUnitInfoDescriptor ;
29
30
31
+ import org .springframework .core .NativeDetector ;
30
32
import org .springframework .orm .jpa .persistenceunit .SmartPersistenceUnitInfo ;
31
33
32
34
/**
36
38
*
37
39
* @author Juergen Hoeller
38
40
* @author Joris Kuipers
41
+ * @author Sebastien Deleuze
39
42
* @since 4.1
40
43
* @see Configuration#addPackage
41
44
*/
42
45
class SpringHibernateJpaPersistenceProvider extends HibernatePersistenceProvider {
43
46
47
+ static {
48
+ if (NativeDetector .inNativeImage ()) {
49
+ System .setProperty (Environment .BYTECODE_PROVIDER , Environment .BYTECODE_PROVIDER_NAME_NONE );
50
+ }
51
+ }
52
+
44
53
@ Override
45
54
@ SuppressWarnings ("rawtypes" )
46
55
public EntityManagerFactory createContainerEntityManagerFactory (PersistenceUnitInfo info , Map properties ) {
You can’t perform that action at this time.
0 commit comments