application-dev.yml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. server:
  2. port: 8086
  3. spring:
  4. servlet:
  5. multipart:
  6. enabled: true
  7. max-file-size: 10MB
  8. max-request-size: 12MB
  9. # <<=======内置H2数据库连接设置开始==========
  10. jpa:
  11. #show-sql: true
  12. hibernate:
  13. ddl-auto: update
  14. properties:
  15. hibernate:
  16. format_sql: true
  17. datasource:
  18. url: jdbc:h2:./data/iotkit;MODE=MySQL
  19. username: sa
  20. password: 123456
  21. driverClassName: org.h2.Driver
  22. ## 内置h2 web console设置
  23. platform: h2
  24. h2:
  25. console:
  26. enabled: true
  27. path: /h2
  28. settings:
  29. web-allow-others: true
  30. # =======内置H2数据库连接设置结束==========>>
  31. # <<==========mysql配置开始==============
  32. # datasource:
  33. # url: jdbc:mysql://127.0.0.1:3306/iotkit?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useSSL=false
  34. # driverClassName: com.mysql.cj.jdbc.Driver
  35. # username: root
  36. # password: 123456
  37. # validationQuery: SELECT 1
  38. # testOnBorrow: true
  39. # jpa:
  40. # database: MySQL
  41. # database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
  42. ## show-sql: true
  43. # hibernate:
  44. # ddl-auto: update
  45. # properties:
  46. # hibernate:
  47. # format_sql: true
  48. # ============mysql配置结束============>>
  49. elasticsearch:
  50. rest:
  51. #使用内置es的配置
  52. uris: http://127.0.0.1:9200
  53. username:
  54. password:
  55. connection-timeout: 10s
  56. redis:
  57. #使用内置redis的配置
  58. host: 127.0.0.1
  59. port: 6379
  60. database: 0
  61. password:
  62. mvc:
  63. pathmatch:
  64. matching-strategy: ant_path_matcher
  65. #图片存储用的是阿里云oss,如果需要上传产品图片才需要配置
  66. aliyun:
  67. bucketId: iotkit-img
  68. endpoint: oss-cn-shenzhen.aliyuncs.com
  69. accessKeyId: 填写阿里云accessKeyId
  70. accessKeySecret: 填写阿里云accessKeySecret
  71. sa-token:
  72. # token名称 (同时也是cookie名称)
  73. token-name: token
  74. # token有效期,单位s 默认30天, -1代表永不过期
  75. timeout: 2592000
  76. # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
  77. activity-timeout: -1
  78. # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
  79. is-concurrent: true
  80. # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
  81. is-share: false
  82. # token风格
  83. token-style: uuid
  84. # 是否输出操作日志
  85. is-log: false
  86. #认证中心地址
  87. oauth2:
  88. auth-server-url: http://127.0.0.1:8086