[Kotlin] Adding the Hibernate dependencies to our project and creating the database

pom.xml:

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>

Add Hibernate and h2 into our pom.xml.

 

application.properties:

spring.datasource.url=jdbc:h2:file:~/theater
spring.datasource.driverClassName = org.h2.Driver
spring.datasource.username = sa
spring.datasource.password =
spring.jpa.properties.hibernate.hbm2dll.auto = update

 

Open: localhost:8080/h2-cosnole in browser: modify accordingly

 

When click connect: See the database UI

 

posted @ 2020-11-05 21:06  Zhentiw  阅读(121)  评论(0编辑  收藏  举报