Jelajahi Sumber

update: 更新配置文件

jay 1 tahun lalu
induk
melakukan
993f05b75e

+ 194 - 0
iot-starter/src/main/resources/application-dev.yml

@@ -0,0 +1,194 @@
+
+server:
+  port: 8086
+
+spring:
+  servlet:
+    multipart:
+      enabled: true
+      max-file-size: 100MB
+      max-request-size: 100MB
+
+  #注: 切换数据库时需要将项目根目录中的.init文件删除再重启
+  # <<=======内置H2数据库连接设置开始==========
+  jpa:
+    show-sql: false
+    hibernate:
+      ddl-auto: update
+    properties:
+      hibernate:
+        format_sql: true
+  datasource:
+    type: com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.h2.Driver
+    url: jdbc:h2:./data/iotkit;MODE=MySQL
+    username: sa
+    password: 123456
+    hikari:
+      connection-timeout: 5000
+      idle-timeout: 30000 # 经过idle-timeout时间如果连接还处于空闲状态, 该连接会被回收
+      min-idle: 5 # 池中维护的最小空闲连接数, 默认为 10 个
+      max-pool-size: 16 # 池中最大连接数, 包括闲置和使用中的连接, 默认为 10 个
+      max-lifetime: 60000 # 如果一个连接超过了时长,且没有被使用, 连接会被回收
+      is-auto-commit: true
+    # 内置h2 web console设置
+    platform: h2
+  h2:
+    console:
+      enabled: true
+      path: /h2
+      settings:
+        web-allow-others: true
+  #=======内置H2数据库连接设置结束==========>>
+
+  # <<==========mysql配置开始==============
+#  jpa:
+#    database: MySQL
+#    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+#    show-sql: false
+#    hibernate:
+#      ddl-auto: update
+#    properties:
+#      hibernate:
+#        format_sql: true
+#  datasource:
+#    type: com.zaxxer.hikari.HikariDataSource
+#    driverClassName: com.mysql.cj.jdbc.Driver
+#    # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
+#    url: jdbc:mysql://127.0.0.1:3306/iotkit?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useSSL=false
+#    username: root
+#    password: 123456
+#    hikari:
+#      connection-timeout: 5000
+#      idle-timeout: 30000 # 经过idle-timeout时间如果连接还处于空闲状态, 该连接会被回收
+#      min-idle: 5 # 池中维护的最小空闲连接数, 默认为 10 个
+#      max-pool-size: 16 # 池中最大连接数, 包括闲置和使用中的连接, 默认为 10 个
+#      max-lifetime: 60000 # 如果一个连接超过了时长,且没有被使用, 连接会被回收
+#      is-auto-commit: true
+  # ============mysql配置结束============>>
+
+  #<<================es时序数据配置开始===============
+  elasticsearch:
+    embedded:
+      # 是否启用内部es
+      enabled: true
+      port: 9200
+    rest:
+      #使用内置es的配置
+      #uris: http://elasticsearch:9200
+      uris: http://127.0.0.1:9200
+      username:
+      password:
+      connection-timeout: 10s
+  #================es时序数据配置结束===============>>
+
+  #<<===========tdengine时序数据库配置开始============
+#  td-datasource:
+#    url: jdbc:TAOS-RS://127.0.0.1:6041/iotkit?timezone=UTC-8&charset=UTF-8&locale=en_US.UTF-8
+#    username: root
+#    password: taosdata
+#    driverClassName: com.taosdata.jdbc.rs.RestfulDriver
+  #===========tdengine时序数据库配置开始============>>
+
+
+  #<<===========iotdb时序数据库配置开始============
+#  iotdb-datasource:
+#    host: 127.0.0.1
+#    port: 6667
+#    username: root
+#    password: root
+  #===========tdengine时序数据库配置开始============>>
+
+  redis:
+    #使用内置redis的配置
+    embedded:
+      enabled: true
+    #host: redis
+    host: 127.0.0.1
+    port: 6378
+    database: 0
+
+  mvc:
+    pathmatch:
+      matching-strategy: path_pattern_parser
+#  profiles:
+#    active: mysql
+
+#application.yml中打开注释支持rocketMq作为消息总线,pom.xml中打开注释使用rocketmq消息总线
+#rocketmq:
+#  name-server: 172.16.1.113:9876
+#  producer:
+#        group: iotkit
+
+#图片存储用的是阿里云oss,如果需要上传产品图片才需要配置
+aliyun:
+  bucketId:
+  endpoint:
+  accessKeyId:
+  accessKeySecret:
+
+sa-token:
+  # token名称 (同时也是cookie名称)
+  token-name: token
+  # token有效期,单位s 默认30天, -1代表永不过期
+  timeout: 2592000
+  # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
+  activity-timeout: -1
+  # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
+  is-concurrent: true
+  # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
+  is-share: false
+  # token风格
+  token-style: uuid
+  # 是否输出操作日志
+  is-log: false
+
+captcha:
+  enable: true
+  # 页面 <参数设置> 可开启关闭 验证码校验
+  # 验证码类型 math 数组计算 char 字符验证
+  type: MATH
+  # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
+  category: CIRCLE
+  # 数字验证码位数
+  numberLength: 1
+  # 字符验证码长度
+  charLength: 4
+
+# 用户配置
+user:
+  password:
+    # 密码最大错误次数
+    maxRetryCount: 5
+    # 密码锁定时间(默认10分钟)
+    lockTime: 10
+
+# openapi配置
+openapi:
+  appid: 123456789
+  password: 123456
+
+oss:
+  region: xxxxx
+  endpoint: xxxxx
+  accessKey: xxxxx
+  secretKey: xxxxx
+  buckName: xxxx
+
+#微信小程序配置
+weixin:
+  appid: xx
+  secret: xx
+  authUrl: xx
+
+websocket:
+  enabled: true
+  path: /websocket
+  allowedOrigins: '*'
+
+# 插件配置
+plugin:
+  runMode: prod
+  mainPackage: cc.iotkit
+  pluginPath:
+    - ./data/plugins

+ 4 - 191
iot-starter/src/main/resources/application.yml

@@ -1,194 +1,7 @@
-
-server:
-  port: 8086
-
 spring:
-  servlet:
-    multipart:
-      enabled: true
-      max-file-size: 100MB
-      max-request-size: 100MB
-
-  #注: 切换数据库时需要将项目根目录中的.init文件删除再重启
-  # <<=======内置H2数据库连接设置开始==========
-  jpa:
-    show-sql: false
-    hibernate:
-      ddl-auto: update
-    properties:
-      hibernate:
-        format_sql: true
-  datasource:
-    type: com.zaxxer.hikari.HikariDataSource
-    driverClassName: org.h2.Driver
-    url: jdbc:h2:./data/iotkit;MODE=MySQL
-    username: sa
-    password: 123456
-    hikari:
-      connection-timeout: 5000
-      idle-timeout: 30000 # 经过idle-timeout时间如果连接还处于空闲状态, 该连接会被回收
-      min-idle: 5 # 池中维护的最小空闲连接数, 默认为 10 个
-      max-pool-size: 16 # 池中最大连接数, 包括闲置和使用中的连接, 默认为 10 个
-      max-lifetime: 60000 # 如果一个连接超过了时长,且没有被使用, 连接会被回收
-      is-auto-commit: true
-    # 内置h2 web console设置
-    platform: h2
-  h2:
-    console:
-      enabled: true
-      path: /h2
-      settings:
-        web-allow-others: true
-  #=======内置H2数据库连接设置结束==========>>
-
-  # <<==========mysql配置开始==============
-#  jpa:
-#    database: MySQL
-#    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
-#    show-sql: false
-#    hibernate:
-#      ddl-auto: update
-#    properties:
-#      hibernate:
-#        format_sql: true
-#  datasource:
-#    type: com.zaxxer.hikari.HikariDataSource
-#    driverClassName: com.mysql.cj.jdbc.Driver
-#    # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
-#    url: jdbc:mysql://127.0.0.1:3306/iotkit?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useSSL=false
-#    username: root
-#    password: 123456
-#    hikari:
-#      connection-timeout: 5000
-#      idle-timeout: 30000 # 经过idle-timeout时间如果连接还处于空闲状态, 该连接会被回收
-#      min-idle: 5 # 池中维护的最小空闲连接数, 默认为 10 个
-#      max-pool-size: 16 # 池中最大连接数, 包括闲置和使用中的连接, 默认为 10 个
-#      max-lifetime: 60000 # 如果一个连接超过了时长,且没有被使用, 连接会被回收
-#      is-auto-commit: true
-  # ============mysql配置结束============>>
-
-  #<<================es时序数据配置开始===============
-  elasticsearch:
-    embedded:
-      # 是否启用内部es
-      enabled: true
-      port: 9200
-    rest:
-      #使用内置es的配置
-      #uris: http://elasticsearch:9200
-      uris: http://127.0.0.1:9200
-      username:
-      password:
-      connection-timeout: 10s
-  #================es时序数据配置结束===============>>
-
-  #<<===========tdengine时序数据库配置开始============
-#  td-datasource:
-#    url: jdbc:TAOS-RS://127.0.0.1:6041/iotkit?timezone=UTC-8&charset=UTF-8&locale=en_US.UTF-8
-#    username: root
-#    password: taosdata
-#    driverClassName: com.taosdata.jdbc.rs.RestfulDriver
-  #===========tdengine时序数据库配置开始============>>
-
-
-  #<<===========iotdb时序数据库配置开始============
-#  iotdb-datasource:
-#    host: 127.0.0.1
-#    port: 6667
-#    username: root
-#    password: root
-  #===========tdengine时序数据库配置开始============>>
-
-  redis:
-    #使用内置redis的配置
-    embedded:
-      enabled: true
-    #host: redis
-    host: 127.0.0.1
-    port: 6378
-    database: 0
-
-  mvc:
-    pathmatch:
-      matching-strategy: path_pattern_parser
-#  profiles:
-#    active: mysql
-
-#application.yml中打开注释支持rocketMq作为消息总线,pom.xml中打开注释使用rocketmq消息总线
-#rocketmq:
-#  name-server: 172.16.1.113:9876
-#  producer:
-#        group: iotkit
-
-#图片存储用的是阿里云oss,如果需要上传产品图片才需要配置
-aliyun:
-  bucketId:
-  endpoint:
-  accessKeyId:
-  accessKeySecret:
-
-sa-token:
-  # token名称 (同时也是cookie名称)
-  token-name: token
-  # token有效期,单位s 默认30天, -1代表永不过期
-  timeout: 2592000
-  # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
-  activity-timeout: -1
-  # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
-  is-concurrent: true
-  # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
-  is-share: false
-  # token风格
-  token-style: uuid
-  # 是否输出操作日志
-  is-log: false
-
-captcha:
-  enable: true
-  # 页面 <参数设置> 可开启关闭 验证码校验
-  # 验证码类型 math 数组计算 char 字符验证
-  type: MATH
-  # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
-  category: CIRCLE
-  # 数字验证码位数
-  numberLength: 1
-  # 字符验证码长度
-  charLength: 4
-
-# 用户配置
-user:
-  password:
-    # 密码最大错误次数
-    maxRetryCount: 5
-    # 密码锁定时间(默认10分钟)
-    lockTime: 10
-
-# openapi配置
-openapi:
-  appid: 123456789
-  password: 123456
-
-oss:
-  region: xxxxx
-  endpoint: xxxxx
-  accessKey: xxxxx
-  secretKey: xxxxx
-  buckName: xxxx
-
-#微信小程序配置
-weixin:
-  appid: xx
-  secret: xx
-  authUrl: xx
+  profiles:
+    active: dev # 使用application-dev.yml 配置
+#    active: prd # 使用application-prd.yml 配置
+#    active: test # 使用application-test.yml 配置
 
-websocket:
-  enabled: true
-  path: /websocket
-  allowedOrigins: '*'
 
-# 插件配置
-plugin:
-  runMode: prod
-  mainPackage: cc.iotkit
-  pluginPath:
-    - ./data/plugins