Skip to content

Commit 4d4b91a

Browse files
committed
Clarify use of persistence.xml in doc
Closes gh-12636
1 parent 345b2c5 commit 4d4b91a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,10 +2029,10 @@ If you are using Spring Data, you need to configure `@EnableJpaRepositories` acc
20292029

20302030
[[howto-use-traditional-persistence-xml]]
20312031
=== Use a traditional persistence.xml
2032-
Spring doesn't require the use of XML to configure the JPA provider, and Spring Boot
2033-
assumes you want to take advantage of that feature. If you prefer to use `persistence.xml`
2034-
then you need to define your own `@Bean` of type `LocalEntityManagerFactoryBean` (with
2035-
id '`entityManagerFactory`', and set the persistence unit name there.
2032+
Spring Boot will not search for or use a `META-INF/persistence.xml` by default. If you
2033+
prefer to use a traditional `persistence.xml`, you need to define your own `@Bean` of type
2034+
`LocalEntityManagerFactoryBean` (with id '`entityManagerFactory`', and set the persistence
2035+
unit name there.
20362036

20372037
See
20382038
{sc-spring-boot-autoconfigure}/orm/jpa/JpaBaseConfiguration.{sc-ext}[`JpaBaseConfiguration`]

0 commit comments

Comments
 (0)