spring-framework / org.springframework.orm.jpa / EntityManagerFactoryAccessor / setPersistenceUnitName

setPersistenceUnitName

open fun setPersistenceUnitName(@Nullable persistenceUnitName: String): Unit

Set the name of the persistence unit to access the EntityManagerFactory for.

This is an alternative to specifying the EntityManagerFactory by direct reference, resolving it by its persistence unit name instead. If no EntityManagerFactory and no persistence unit name have been specified, a default EntityManagerFactory will be retrieved through finding a single unique bean of type EntityManagerFactory.

See Also
#setEntityManagerFactory