Add How-To documentation for ManagedClassNameFilter

This commit documents the support of ManagedClassNameFilter that was
added in gh-39813.

See gh-40617
This commit is contained in:
Stéphane Nicoll
2024-05-03 10:36:22 +02:00
committed by Scott Frederick
parent 208efae975
commit d945443f1f
3 changed files with 74 additions and 0 deletions

View File

@@ -177,6 +177,17 @@ include-code::MyApplication[]
[[howto.data-access.filter-scanned-entity-definitions]]
== Filter scanned @Entity definitions
It is possible to exclude some `@Entity` definitions using a `ManagedClassNameFilter` bean.
This can be useful in tests when only a sub-set of the available entities should be considered.
In the following example, only entities from the `com.example.app.customer` package are included:
include-code::MyEntityScanConfiguration[]
[[howto.data-access.jpa-properties]]
== Configure JPA Properties