open fun setDefaultPersistenceUnitName(@Nullable unitName: String): Unit
Specify the default persistence unit name, to be used in case of no unit name specified in an @PersistenceUnit / @PersistenceContext annotation.
This is mainly intended for lookups in the application context, indicating the target persistence unit name (typically matching the bean name), but also applies to lookups in the "persistenceUnits" / "persistenceContexts" / "extendedPersistenceContexts" map, avoiding the need for duplicated mappings for the empty String there.
Default is to check for a single EntityManagerFactory bean in the Spring application context, if any. If there are multiple such factories, either specify this default persistence unit name or explicitly refer to named persistence units in your annotations.