Переглянути джерело

feat: 修改springboot配置

yangliu 3 місяців тому
батько
коміт
5155fa76f5

+ 0 - 0
device-service-server/src/main/resources/bootstrap-dev.yml → device-service-server/src/main/resources/application-dev.yml


+ 0 - 0
device-service-server/src/main/resources/bootstrap-local.yml → device-service-server/src/main/resources/application-local.yml


+ 0 - 0
device-service-server/src/main/resources/bootstrap-prod.yml → device-service-server/src/main/resources/application-prod.yml


+ 0 - 0
device-service-server/src/main/resources/bootstrap-test.yml → device-service-server/src/main/resources/application-test.yml


+ 32 - 83
device-service-server/src/main/resources/application.yml

@@ -1,83 +1,32 @@
-#spring:
-#  application:
-#    name: device-service
-#  # 数据库配置
-#  datasource:
-#    type: com.zaxxer.hikari.HikariDataSource
-#    driver-class-name: com.mysql.cj.jdbc.Driver
-#    url: jdbc:mysql://localhost:3306/hfln_device?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
-#    username: root
-#    password: 123456
-#    hikari:
-#      minimum-idle: 5
-#      maximum-pool-size: 20
-#      auto-commit: true
-#      idle-timeout: 30000
-#      pool-name: HikariCP
-#      max-lifetime: 1800000
-#      connection-timeout: 30000
-#      connection-test-query: SELECT 1
-#  redis:
-#    host: localhost
-#    port: 6379
-#    password:
-#    database: 0
-#  jackson:
-#    date-format: yyyy-MM-dd HH:mm:ss
-#    time-zone: GMT+8
-#
-## MQTT配置
-#mqtt:
-#  broker:
-#    url: tcp://localhost:1883
-#  client:
-#    id: hfln-device-service
-#  username: admin
-#  password: public
-#  topics: hfln/device/#
-#  qos: 1
-#  completion:
-#    timeout: 5000
-#
-## 告警配置
-#alarm:
-#  retention-time: 60
-#  retention-keep-time: 30
-#  retention-alarm-time: 180
-#
-## MyBatis配置
-#mybatis:
-#  mapper-locations: classpath:mapper/*.xml
-#  type-aliases-package: com.hfln.device.infrastructure.po
-#  configuration:
-#    map-underscore-to-camel-case: true
-#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-#
-## 日志配置
-#logging:
-#  level:
-#    root: info
-#    com.hfln: debug
-#  file:
-#    name: logs/device-service.log
-#    max-size: 10MB
-#    max-history: 30
-#
-## 服务器配置
-#server:
-#  port: 8080
-#  servlet:
-#    context-path: /device-service
-#
-## 设备配置
-#device:
-#  check-interval: 30
-#  offline-timeout: 180
-#  # 设备保活超时时间(毫秒)
-#  keepalive-timeout: 60000
-#  # 设备告警确认超时时间(毫秒)
-#  alarm-ack-timeout: 300000
-#  # 设备停留时间阈值(毫秒)
-#  stay-time-threshold: 600000
-#  # 设备滞留时间阈值(毫秒)
-#  retention-time-threshold: 1800000
+server:
+  port: 8092
+spring:
+  mvc:
+    pathmatch:
+      matching-strategy: ant_path_matcher
+  profiles:
+    active: dev
+  application:
+    name: device-service-server
+
+logging:
+  level:
+    root: info
+
+
+feign:
+  okhttp:
+    enabled: true
+ribbon:
+  ConnectTimeout: 3000
+  ReadTimeout: 3000
+mybatis:
+  configuration:
+    #开启驼峰命名
+    map-underscore-to-camel-case: true
+mybatis-plus:
+  global-config:
+    db-config:
+      logic-delete-field: del_flag
+      logic-delete-value: 1
+      logic-not-delete-value: 0

+ 0 - 32
device-service-server/src/main/resources/bootstrap.yml

@@ -1,32 +0,0 @@
-server:
-  port: 8092
-spring:
-  mvc:
-    pathmatch:
-      matching-strategy: ant_path_matcher
-  profiles:
-    active: dev
-  application:
-    name: device-service-server
-
-logging:
-  level:
-    root: info
-
-
-feign:
-  okhttp:
-    enabled: true
-ribbon:
-  ConnectTimeout: 3000
-  ReadTimeout: 3000
-mybatis:
-  configuration:
-    #开启驼峰命名
-    map-underscore-to-camel-case: true
-mybatis-plus:
-  global-config:
-    db-config:
-      logic-delete-field: del_flag
-      logic-delete-value: 1
-      logic-not-delete-value: 0