Spring Boot 2.0 Cookbook(Second Edition)
上QQ阅读APP看书,第一时间看更新

How it works...

As we can see, the application started just fine, but as we didn't add any functionality or configure any services, it existed straight away. From the startup log, however, we do see that the autoconfiguration did take place. Let's take a look at the following lines:

    Building JPA container EntityManagerFactory for persistence unit 
'default'
HHH000412: Hibernate Core {5.2.12.Final} HHH000400: Using dialect: org.hibernate.dialect.H2Dialect

This information tells us that, because we added the jdbc and data-jpa starters, the JPA container was created and will use Hibernate 5.2.12.Final to manage the persistence using H2Dialect. This was possible because we had the right classes in the classpath.