zoukankan      html  css  js  c++  java
  • [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

  • 相关阅读:
    java 8
    内存溢出VS内存泄漏
    dubbo zk 分布式服务项目搭建与配置
    转发 VS 重定向
    过滤器
    Synchronized
    java 泛型
    spring 整合 mongo
    泛型
    反虚拟机
  • 原文地址:https://www.cnblogs.com/Answer1215/p/13933969.html
Copyright © 2011-2022 走看看