spring_reference/IX. ‘How-to’ guides/67.6. Use a custom EntityMa...

4 lines
279 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 67.6. 使用自定义的EntityManagerFactory
为了完全控制EntityManagerFactory的配置你需要添加一个名为`entityManagerFactory`的`@Bean`。Spring Boot自动配置会根据是否存在该类型的bean来关闭它的实体管理器entity manager