// Determine the entity manager bean which matches the qualifiers of the repository.
Bean<EntityManager> entityManagerBean = entityManagers.get(qualifiers);
if (entityManagerBean == null) {
throw new UnsatisfiedResolutionException(String.format("Unable to resolve a bean for '%s' with qualifiers %s.",
EntityManager.class.getName(), qualifiers));
}
// Construct and return the repository bean.
return new JpaRepositoryBean<T>(beanManager, entityManagerBean, qualifiers, repositoryType,