在spring中使用Hibernate5
[TOC] 1. Overview In this article, we’ll discuss how to bootstrap Hibernate 5 with Spring , using both Java and XML configuration. 2. Spring Integration Bootstrapping a SessionFactory with the native Hibernate API is a bit complicated and would take us quite a few lines of code (have a look at the official documentation in case you really need to do that). Fortunately, Spring supports bootstrapping the SessionFactory – so that we only need a few lines of Java code or XML configuration. Also, before we jump in, if you’re working with older versions of Hibernate, you can have a look at the