application.yml 4.5 KB

#上传文件的路径,要带斜杠
web:
  upload-path: upload/
server:
  port: 8066
  servlet:
    context-path: ${SERVER_CONTEXTPATH:}
spring:
  devtools:
    add-properties: false
  profiles:
    active: prd
  mvc:
    #静态资源,设置上传文件的访问,
    static-path-pattern: /**
  zipkin:
    base-url: http://192.168.1.63:9411
  sleuth:
    sampler:
      probability: 0.1
  resources:
    static-locations: classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path}

  application:
    name: cloud-kako-user-center
  redis:
#    host: 127.0.0.1
    host: 192.168.1.53
    port: 6379
    password: vmvnv1v2VV.
  jackson:
    serialization:
      FAIL_ON_EMPTY_BEANS: false
    #springboot2.0之后会把Date类型字段自动给转成UTC字符串 如:1990-11-26T16:00:00.000+0000,如果想转成时间戳在application.properties配置文件增加以下配置
    date-format: yyyy-MM-dd HH:mm:ss
    #时区必须要设置
    time-zone: GMT+8
    #ALWAYS的意思是即时属性为null,仍然也会输出这个key
    default-property-inclusion: always

  cloud:
  #eureka主机名,会在控制页面中显示
  #DEV环境关闭注册。
    features:
      enabled: true
    discovery:
      enabled: true
    service-registry:
      auto-registration:
        enabled: true

  datasource:
        type: com.zaxxer.hikari.HikariDataSource
        #oracle
        #driver-class-name=oracle.jdbc.OracleDriver
        #url=jdbc:oracle:thin:@10.50.3.68:1521:CGODW
        #username=CGOETL
        #password=1q2w3e4r
        #spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码
        url: jdbc:mysql://118.31.66.166:3306/station?useUnicode=true&characterEncoding=utf8
        username: 110
        password: QAHqCJf2kFYCLirM
        driver-class-name: com.mysql.cj.jdbc.Driver
        # HikariCP特有配置
        hikari:
          # 连接池名称
          pool-name: KakoUserHikariCP-
          # 最小空闲连接数
          minimum-idle: 1
          # 最大连接数
          maximum-pool-size: 20
          # 连接超时时间(毫秒)
          connection-timeout: 60000
          # 空闲连接超时时间(毫秒)
          idle-timeout: 300000
          # 连接测试超时时间
          validation-timeout: 3000
          # 连接最大生命周期
          max-lifetime: 1800000
          # 连接测试查询
          connection-test-query: SELECT 1
          # 初始化连接数
          initialization-fail-timeout: 1

eureka:
  instance:
    #eureka服务器页面中status的请求路径
#    status-page-url:  http://${eureka.instance.hostname}:${server.port}/index
    prefer-ip-address: true
    instance-id:  ${spring.cloud.client.ip-address}:${server.port}
    hostname: ${spring.cloud.client.ip-address}
    lease-renewal-interval-in-seconds: 15
    lease-expiration-duration-in-seconds: 45
    health-check-url-path: /ac/health
  client:
    #eureka注册中心服务器地址
    service-url:
#      defaultZone: http://127.0.0.1:12345/eureka/
      defaultZone: http://192.168.1.53:12345/eureka/
    registry-fetch-interval-seconds:  30

management:
  endpoints:
    enabled-by-default: true
    web:
      base-path: /ac  # 端点路径更改为 /ac
      exposure:
        include: "health,info"  # 仅暴露必要端点
  endpoint:
    health:
      show-details: never  # 不显示详细健康信息
    shutdown:
      enabled: false  # 禁用关闭端点
    env:
      enabled: false  # 禁用环境端点(防止敏感信息泄露)
    mappings:
      enabled: false  # 禁用映射端点(防止接口路径泄露)
    beans:
      enabled: false  # 禁用beans端点
    configprops:
      enabled: false  # 禁用configprops端点


mybatis:
  mapper-locations: classpath:mapping/*.xml
  type-aliases-package: com.tianbo.warehouse.model
pagehelper:
  #auto-dialect: true
  #auto-runtime-dialect: true
  helper-dialect: mysql
  reasonable: true

  support-methods-arguments: true
  params: count=countSql

#debug配置,debug或者为true的时候,logback才会记录和写入日志文件
trace: false
debug: false

logging:
  file:
    path: ./logs/
    name: system.log
  config: config/logback-dev.xml
  #转移到logback配置文件中
  #level:
    #org.apache.tomcat: info
    #com.tianbo.warehouse.dao: DEBUG
    #org.springframework.security: trace
  #日志配置,输出到文本,
#Java Web Token 时效时间,单位秒
jwt:
  max-alive: 30000

info:
  version: 2.0
  description: "具有公司及部门管理级别的用户管理中心"