# 配置主键

# 1. 设置 strategy 为 GenerationType.AUTO,  让jpa 选择合适方式匹配
# 2. 在数据库内设置对应主键, 以及主键自增的规则
# 3. 驱动依赖主项目添加版本, 未直接引用, 需在子项目内添加

# 各数据库

# database
spring:
  datasource:
    hikari:
      connection-init-sql: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci           # SqlServer, Oracle 无需设置类型
    driver-class-name: com.mysql.cj.jdbc.Driver
    username: root
    password: mu123
    url: jdbc:mysql://127.0.0.1:3306/mjava?serverTimezone=Asia/Shanghai&useUnicode=yes&characterEncoding=UTF-8&useSSL=true
  # JPA
  jpa:
    database: MYSQL
    database-platform: org.hibernate.dialect.MySQL57Dialect

# database
spring-2:
  # sql_server
  datasource:
    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    url: jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=DingTalkApprove
    username: sa
    password: Sa123456
  # JPA
  jpa:
    database: sql_server
    properties:
      hibernate:
        default_schema: dbo

# database
spring-3:
  # Oracle
  datasource:
    driver-class-name: oracle.jdbc.OracleDriver
    username: front_jszyxx_2023
    password: FrontU#JSZYxx#2023
    url: jdbc:oracle:thin:@10.107.58.35:1521:jszyfzda
  jpa:
    hibernate:
      ddl-auto: none      # JPA对表没有任何操作
    show-sql: true
    database: oracle
server:
  tomcat:
    additional-tld-skip-patterns: osdt_core.jar,osdt_cert.jar   # oracle6 忽略依赖包警告

# database
spring-4:
  # MongoDB配置
  data:
    mongodb:
      uri: mongodb://tbread:Teambition999@192.168.31.201:27017/teambition   # 固定格式 [连接成功后, 需要为 teambition 库添加 admin 权限才可查询]

# 其他配置
spring-0:
  jpa:
    hibernate:
      # 取消小驼峰到下划线映射
      naming:
        implicit-strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
        sphysical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl