springboot整合mysql、oracle、高斯数据库gaussdb

springboot整合mysql

pom.xml 依赖包

      
        mysql
        mysql-connector-java
        runtime
      

.yml 配置

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/test?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
    username: test
    password: 123456

springboot整合oracle

pom.xml 依赖包

        
            com.oracle
            ojdbc6
            11.2.0.3
        

.yml 配置

spring:
  datasource:
    driver-class-name: oracle.jdbc.driver.OracleDriver
    url: jdbc:oracle:thin:@localhost:1521/orcl
    username: test
    password: 123456

springboot整合高斯gaussdb

pom.xml 依赖包

    
      com.huaweicloud.dws
      huaweicloud-dws-jdbc
      8.1.0
    

.yml 配置

spring:
  datasource:
    driver-class-name: org.postgresql.Driver
    url: jdbc:postgresql://localhost:5432/test?currentSchema=test
    username: test
    password: 123456

你可能感兴趣的:(2,数据库,oracle,数据库,mysql)