Clarify use of persistence.xml in doc

Closes gh-12636
This commit is contained in:
Stephane Nicoll 2018-03-27 16:12:06 +02:00
parent 345b2c5def
commit 4d4b91a51e
1 changed files with 4 additions and 4 deletions

View File

@ -2029,10 +2029,10 @@ If you are using Spring Data, you need to configure `@EnableJpaRepositories` acc
[[howto-use-traditional-persistence-xml]]
=== Use a traditional persistence.xml
Spring doesn't require the use of XML to configure the JPA provider, and Spring Boot
assumes you want to take advantage of that feature. If you prefer to use `persistence.xml`
then you need to define your own `@Bean` of type `LocalEntityManagerFactoryBean` (with
id '`entityManagerFactory`', and set the persistence unit name there.
Spring Boot will not search for or use a `META-INF/persistence.xml` by default. If you
prefer to use a traditional `persistence.xml`, you need to define your own `@Bean` of type
`LocalEntityManagerFactoryBean` (with id '`entityManagerFactory`', and set the persistence
unit name there.
See
{sc-spring-boot-autoconfigure}/orm/jpa/JpaBaseConfiguration.{sc-ext}[`JpaBaseConfiguration`]