Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
bfb08864
Commit
bfb08864
authored
Nov 08, 2018
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tolerate Hibernate 5.2
Closes gh-15100
parent
159f9478
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
115 additions
and
2 deletions
+115
-2
HibernateJpaConfiguration.java
...boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.java
+7
-2
pom.xml
spring-boot-tests/spring-boot-integration-tests/pom.xml
+1
-0
pom.xml
...t-integration-tests/spring-boot-hibernate52-tests/pom.xml
+44
-0
Hibernate52Application.java
...mework/boot/tests/hibernate52/Hibernate52Application.java
+29
-0
Hibernate52ApplicationTests.java
...k/boot/tests/hibernate52/Hibernate52ApplicationTests.java
+34
-0
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.java
View file @
bfb08864
...
...
@@ -116,8 +116,13 @@ class HibernateJpaConfiguration extends JpaBaseConfiguration {
ConfigurableListableBeanFactory
beanFactory
,
List
<
HibernatePropertiesCustomizer
>
hibernatePropertiesCustomizers
)
{
List
<
HibernatePropertiesCustomizer
>
customizers
=
new
ArrayList
<>();
customizers
.
add
((
properties
)
->
properties
.
put
(
AvailableSettings
.
BEAN_CONTAINER
,
new
SpringBeanContainer
(
beanFactory
)));
if
(
ClassUtils
.
isPresent
(
"org.hibernate.resource.beans.container.spi.BeanContainer"
,
getClass
().
getClassLoader
()))
{
customizers
.
add
((
properties
)
->
properties
.
put
(
AvailableSettings
.
BEAN_CONTAINER
,
new
SpringBeanContainer
(
beanFactory
)));
}
if
(
physicalNamingStrategy
!=
null
||
implicitNamingStrategy
!=
null
)
{
customizers
.
add
(
new
NamingStrategiesHibernatePropertiesCustomizer
(
physicalNamingStrategy
,
implicitNamingStrategy
));
...
...
spring-boot-tests/spring-boot-integration-tests/pom.xml
View file @
bfb08864
...
...
@@ -18,6 +18,7 @@
<modules>
<module>
spring-boot-configuration-processor-tests
</module>
<module>
spring-boot-devtools-tests
</module>
<module>
spring-boot-hibernate52-tests
</module>
<module>
spring-boot-server-tests
</module>
<module>
spring-boot-launch-script-tests
</module>
</modules>
...
...
spring-boot-tests/spring-boot-integration-tests/spring-boot-hibernate52-tests/pom.xml
0 → 100755
View file @
bfb08864
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-integration-tests
</artifactId>
<version>
${revision}
</version>
</parent>
<artifactId>
spring-boot-hibernate52-tests
</artifactId>
<name>
Spring Boot Hibernate 5.2 tests
</name>
<description>
${project.name}
</description>
<properties>
<main.basedir>
${basedir}/../../..
</main.basedir>
<hibernate.version>
5.2.17.Final
</hibernate.version>
</properties>
<dependencies>
<!-- Compile -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-jpa
</artifactId>
</dependency>
<!-- Runtime -->
<dependency>
<groupId>
com.h2database
</groupId>
<artifactId>
h2
</artifactId>
<scope>
runtime
</scope>
</dependency>
<!-- Test -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
spring-boot-tests/spring-boot-integration-tests/spring-boot-hibernate52-tests/src/main/java/org/springframework/boot/tests/hibernate52/Hibernate52Application.java
0 → 100644
View file @
bfb08864
/*
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org
.
springframework
.
boot
.
tests
.
hibernate52
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
Hibernate52Application
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
Hibernate52Application
.
class
,
args
);
}
}
spring-boot-tests/spring-boot-integration-tests/spring-boot-hibernate52-tests/src/test/java/org/springframework/boot/tests/hibernate52/Hibernate52ApplicationTests.java
0 → 100644
View file @
bfb08864
/*
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org
.
springframework
.
boot
.
tests
.
hibernate52
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
public
class
Hibernate52ApplicationTests
{
@Test
public
void
contextLoads
()
{
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment