whycxzp
2022-10-26 9235e7b869b3389836bf17efd32d3450dfd94a8f
sqlite数据库配置更新
1个文件已添加
2个文件已修改
78 ■■■■ 已修改文件
src/main/resources/config/application-lite-dev.yml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/config/application-lite-prod.yml 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/config/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/config/application-lite-dev.yml
@@ -17,17 +17,11 @@
spring:
  datasource:
    driver-class-name: org.sqlite.JDBC
    url: jdbc:sqlite:C:\Users\29550\Downloads\sqlite-tools-win32-x86-3390400\res.db
#    type: com.alibaba.druid.pool.DruidDataSource
#    driver-class-name: com.mysql.cj.jdbc.Driver
#    url: jdbc:mysql://192.168.10.80:3360/db_res_meter?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
##    url: jdbc:mysql://127.0.0.1:3360/db_res_meter?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
#    username: root
#    password: lmx8688139
#    maxIdel: 60
#    initialPoolSize: 2
#    minPoolSize: 2
#    maxPoolSize: 500
#    url: jdbc:sqlite:C:\Users\29550\Downloads\sqlite-tools-win32-x86-3390400\res.db
    url: jdbc:sqlite:res.db
    initialPoolSize: 2
    minPoolSize: 2
    maxPoolSize: 500
  servlet:
    multipart:
      max-file-size: 200MB
src/main/resources/config/application-lite-prod.yml
New file
@@ -0,0 +1,60 @@
#系统类型:1(普通,无限制),2(严格-gw标准),3(严格-签名)
system:
  type: 1
#服务端口号
server:
  port: 8093
  servlet:
    context-path: /res
    session:
      cookie:
        name: ResMeterManager
  tomcat:
    max-http-form-post-size: 102400000
#数据库
spring:
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    driver-class-name: org.sqlite.JDBC
    url: jdbc:sqlite:res.db
    initialPoolSize: 2
    minPoolSize: 2
    maxPoolSize: 500
  servlet:
    multipart:
      max-file-size: 200MB
      max-request-size: 200MB
mybatis-plus:
  typeAliasesPackage: com.whyc.pojo,com.whyc.dto
  mapper-locations: classpath:mapper/**/*Mapper.xml
  global-config:
    db-config:
      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
      id-type: AUTO
      #驼峰下划线转换
      table-underline: true
      #数据库大写下划线转换
      capital-mode: true
      #mp2.3+ 全局表前缀 tb_
      table-prefix: tb_
      #刷新mapper 调试神器
  #      refresh-mapper: true
  configuration:
    #配置返回数据库(column下划线命名&&返回java实体是驼峰命名),自动匹配无需as(没开启这个,SQL需要写as: select user_id as userId)
    map-underscore-to-camel-case: true
    cache-enabled: false
    #mybatis日志输出
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
pagehelper:
  helper-dialect: mysql
  reasonable: true
  support-methods-arguments: true
  params: count=countSql
knife:
  enable: false
#Config文件读取 涉及License和FGCDFileDownload
configFile:
  type: 2 #1:本地测试;2:打包jar
src/main/resources/config/application.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
#    active: prod
#    active: lite-prod
    active: lite-dev