server: port: 9052 servlet: context-path: '/dhcc-finance-ms' # 应用程序的上下文路径 compression: enabled: true #数据压缩 mime-types: application/json,text/html,text/xml,text/plain,text/css,text/javascript,application/javascript #支持压缩的MIME类型列表,以逗号分隔 min-response-size: 2048 #当前大于2kb则进行压缩-执行压缩所需的最小“Content-Length”值。单位:字节, tomcat: basedir: /data/apps/temp management: server: port: 10252 # 如果您不想通过HTTP公开端点,可以将管理端口设置为 -1 servlet: context-path: '/CFFF9A8BAE8B4913BCFFCDEF4B6AA57D' # 管理端口的上下文路径 endpoints: enabled-by-default: true # 默认情况下是否启用或禁用所有端点 web: exposure: # 需要暴露的端点 include: '*' #health,info,hystrix.stream # Endpoint IDs that should be included or '*' for all. #exclude: # Endpoint IDs that should be excluded or '*' for all. endpoint: health: show-details: ALWAYS security: oauth2: resource: jwt: # 由于key-uri地址不支持负载,需要重写加载远程令牌服务,由于公钥加载时远程当前服务尚未注册到注册中心, # 无法负载,目前只能从本地拉取公钥,详见源码:ResourceServerTokenServicesConfiguration-309 key-uri: http://dhcc-authentication/dhcc-authentication/oauth/token_key #JWT token的URI. 当key为公钥时,或者value不指定时指定. # key-uri: http://localhost:9015/dhcc-authentication/oauth/token_key key-value: jwt # JWT token验证的value. 可以是对称加密或者PEMencoded RSA公钥. 可以使用URI作为value. client: client-id: ms client-secret: 10E4A0FF6236A324145FDE2D433D60FB access-token-uri: http://dhcc-authentication/dhcc-authentication/oauth/token grant-type: client_credentials scope: read,write,trust user-authorization-uri: http://dhcc-authentication/dhcc-authentication/oauth/authorize curator: retryCount: 5 #重试间隔时间 elapsedTimeMs: 5000 # connectString: 119.23.224.103:2181 # zookeeper 地址 connectString: 118.89.217.246:2181 # zookeeper 地址 sessionTimeoutMs: 60000 # session超时时间 connectionTimeoutMs: 5000 # 连接超时时间 lockPath: /lock/order/finance spring: application: name: dhcc-finance-ms servlet: multipart: enabled: true # 是否启用分段上传支持。 max-file-size: 5MB # 最大文件大小。值可以使用后缀“MB”或“KB”分别表示兆字节或千字节。 max-request-size: 25MB # 最大请求大小。值可以使用后缀“MB”或“KB”分别表示兆字节或千字节。 datasource: druid: pmsdb: name: pmsdb url: 'jdbc:mysql://139.199.122.96:3306/pmsdb?characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true' username: pmsdba password: pmsadmin # url: 'jdbc:mysql://139.199.122.96:3306/pms?characterEncoding=UTF-8&useSSL=false' # username: pms # password: pmsadmin driver-class-name: com.mysql.cj.jdbc.Driver filters: stat initial-size: 1 # 初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时 生成建议: 10 max-active: 5 # 最大连接池数量 生成建议:100 min-idle: 1 # 最小连接池数量 生成建议: 10 max-wait: 60000 # 获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置useUnfairLock属性为true使用非公平锁。 pool-prepared-statements: false # 是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。 # max-pool-prepared-statement-per-connection-size: -1 # 要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true。在Druid中,不会存在Oracle下PSCache占用内存过多的问题,可以把这个数值配置大一些,比如说100 # validation-query: # 用来检测连接是否有效的sql,要求是一个查询语句,常用select 'x'。如果validationQuery为null,testOnBorrow、testOnReturn、testWhileIdle都不会起作用。 # validation-query-timeout: # 单位:秒,检测连接是否有效的超时时间。底层调用jdbc Statement对象的void setQueryTimeout(int seconds)方法 test-on-borrow: false # 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 test-on-return: false # 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 test-while-idle: true # 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 min-evictable-idle-time-millis: 60000 # 连接保持空闲而不被驱逐的最小时间 minPoolSize: 5 maxPoolSize: 10 maxLifetime: 20000 borrowConnectionTimeout: 30 loginTimeout: 30 maintenanceInterval: 60 maxIdleTime: 60 testQuery: select 1 oracledb: name: hsfa url: 'jdbc:oracle:thin:@10.213.103.37:1521:orcl' username: hsfa password: hsfa_0601 # 下面为连接池的补充设置,应用到上面所有数据源中 # 初始化大小,最小,最大 minPoolSize: 5 maxPoolSize: 10 maxLifetime: 20000 borrowConnectionTimeout: 30 loginTimeout: 30 maintenanceInterval: 60 maxIdleTime: 60 testQuery: select 1 redis: # REDIS (RedisProperties) 1.5的版本默认采用的连接池技术是jedis 2.0以上版本默认连接池是lettuce, 在这里采用jedis,所以需要排除lettuce的jar # database: 1 # Redis数据库索引(默认为0) # # url = # 连接URL。覆盖主机,端口和密码。用户被忽略。示例:redis:// user:password@example.com :6379 # host: 119.23.224.103 # Redis服务器地址 # port: 16379 # Redis服务器连接端口 # password: '5ee039f74365428fb62334274f6abc1c' # Redis服务器连接密码(默认为空) # timeout: 20000 # 连接超时时间(毫秒) database: 1 # Redis数据库索引(默认为0) host: 118.89.217.246 # Redis服务器地址 port: 9310 # Redis服务器连接端口 password: 'F0561FD2C11B3A1C9A18F8D992F71234' # Redis服务器连接密码(默认为空) timeout: 10000 # 连接超时时间(毫秒) lettuce: pool: max-active: 300 # 连接池最大连接数(使用负值表示没有限制) max-idle: 100 # 连接池中的最大空闲连接 max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) min-idle: 8 # 连接池中的最小空闲连接,此设置仅在其为正时才有效。 rabbitmq: host: 118.89.217.246 port: 5672 username: pms password: 'dhccmobile20181111' publisher-confirms: true #开启发送确认 publisher-returns: true # 开启发送失败退回 zipkin: enabled: true baseUrl: http://dhcc-zipkin-server/ compression: enabled: true sender: type: rabbit # web,rabbit或kafka locator: discovery: enabled: true # 如果启用了发现客户端并希望从服务注册表中的已注册实例检索主机地址,则必须设置该属性 sleuth: enabled: true sampler: probability: 1 # 采样比例 eureka: client: healthcheck: enabled: true # 开启健康检查 service-url: defaultZone: 'http://dhcc:05E38D3E096FE9CAE17E4DA1C6FFD400@localhost:8010/dhcc-eureka-server/eureka/' registry-fetch-interval-seconds: 30 #表示eureka client间隔多久去拉取服务注册信息,默认为30秒,对于api-gateway,如果要迅速获取服务注册状态,可以缩小该值,比如5秒 instance: lease-expiration-duration-in-seconds: 90 # 指示eureka服务器在从其视图中删除此实例之前收到最后一次心跳之后等待的时间(以秒为单位),并禁止此流量通过此实例。将此值设置得太长可能意味着即使实例不活动,流量也可以路由到实例。将此值设置得太小可能意味着,由于临时网络故障,实例可能会被取消流量。此值设置为至少高于leaseRenewalIntervalInSeconds中指定的值 lease-renewal-interval-in-seconds: 30 # 示eureka客户端向Eureka服务器发送心跳以指示其仍处于活动状态所需的频率(以秒为单位)。如果在leaseExpirationDurationInSeconds中指定的时间段内未收到心跳,则eureka服务器将从其视图中删除该实例,此处不允许此实例的流量 prefer-ip-address: true instanceId: ${spring.application.name}:${spring.cloud.client.ip-address}:${spring.application.instance_id:${server.port}} health-check-url-path: /actuator/health metadata-map: cluster: SPRING-DEMO-SERVICE-FEIGN management: context-path: ${management.server.servlet.context-path}/actuator health-check-url: http://${spring.cloud.client.ip-address}:${management.server.port}${management.server.servlet.context-path}/actuator/health status-page-url: http://${spring.cloud.client.ip-address}:${management.server.port}${management.server.servlet.context-path}/actuator/info home-page-url: http://${spring.cloud.client.ip-address}:${management.server.port}${management.server.servlet.context-path} feign: client: default-to-properties: true # If we create both @Configuration bean and configuration properties, configuration properties will win. It will override @Configuration values. But if you want to change the priority to @Configuration, you can change feign.client.default-to-properties to false. config: default: connectTimeout: 5000 # 连接超时, 注意:当使用的ribbon,所以feign不再需要配置超时时长,重试策略,此配置对于请求第三方的服务时会生效,请求内部服务时,会使用ribbon负载均衡, 超时由ribbon提供的超时时间为基准 readTimeout: 20000 # 读取超市 loggerLevel: basic # full compression: # GZIP压缩 request: enabled: true mime-types: text/xml,application/xml,application/json # 压缩类型 min-request-size: 2048 response: enabled: false #关闭响应压缩 与server.compression配置冲突 hystrix: enabled: true # 开启hystrix支持 hystrix: threadpool: default: coreSize: 200 #并发执行的最大线程数,默认10 maxQueueSize: 1000 #BlockingQueue的最大队列数,默认值-1 queueSizeRejectionThreshold: 800 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝,默认值5 command: default: execution: isolation: thread: timeoutInMilliseconds: 60000 # hystrix超时 ribbon: eureka: enabled: true eager-load: enabled: true #开启Ribbon的饥饿加载模式 clients: dhcc-mq-service #指定需要饥饿加载的客户端名称、服务名 ConnectTimeout: 5000 #ribbon请求连接的超时时间 ReadTimeout: 20000 #请求处理的超时时间 MaxAutoRetries: 1 #对当前实例的重试次数 MaxAutoRetriesNextServer: 1 #对下个实例的重试次数 OkToRetryOnAllOperations: false # 是否可以为该客户端重试所有操作(默认情况下,GET方式请求无论是连接异常还是读取异常,都会进行重试,非GET方式请求,只有连接异常时,才会进行重试 ) ServerListRefreshInterval: 10000 # 从源刷新服务器列表的时间间隔 MaxTotalHttpConnections: 20000 #最大http连接数 MaxConnectionsPerHost: 2000 #每个host最大连接数 mybatis: type-aliases-package: 'com.dhcc.finance.main.domain' # entity扫描的包名 mapper-locations: 'classpath*:mapper/mysql/**/*Mapper.xml' # Mapper.xml所在的位置 pagehelper: helperDialect: mysql # 分页插件会自动检测当前的数据库链接,自动选择合适的分页方式。 你可以配置helperDialect属性来指定分页插件使用哪种方言 配置时,可以使用下面的缩写值:oracle,mysql,mariadb,sqlite,hsqldb,postgresql,db2,sqlserver,informix,h2,sqlserver2012,derby reasonable: true # 分页合理化参数,默认值为false。当该参数设置为 true 时,pageNum<=0 时会查询第一页,pageNum>pages(超过总数时),会查询最后一页。默认false 时,直接根据参数进行查询。 supportMethodsArguments: true # 支持通过 Mapper 接口参数来传递分页参数,默认值false,分页插件会从查询方法的参数值中,自动根据上面 params 配置的字段中取值,查找到合适的值时就会自动分页。 fdfs: soTimeout: 1500 connectTimeout: 600 thumbImage: #缩略图生成参数 width: 150 height: 150 trackerList: #TrackerList参数,支持多个 - 118.89.217.246:22122 pool: max-total: 150 #从池中借出的对象的最大数目 max-wait-millis: 500 #获取连接时的最大等待毫秒数100 #客户端版本号,在监控中心显示 info: version: "0.1.1-SNAPSHOT" #客户端版本号,在监控中心显示 | 监控中心地址 owner: Dhcc name: "dhcc-finance-ms" description: "Parent pom providing dependency and plugin management for applications built with Maven" spring-boot-version: "@project.parent.version@" # 日志 logging: config: classpath:logback-spring/logback-spring.xml # 自定义配置 dhcc: data-center: workerId: ${random.long[0,32]} # 工作区id busLogLevel: 'info' # 业务日志级别 fileFullPath: 'http://118.89.217.246:80/' #文件下载地址 nc: pushVoucherInterface: 'http://10.213.103.47:80/service/XChangeServlet?account=0001&groupcode=1' pushAdvanceInterface: 'http://10.213.103.47:80/uapws/service/IQueryBalanceItf' # 团队初始化岗位信息 group: posts: '468723717699010560,481118815279644673,' #高管,董事专员 # fdfs上传文件路径前缀 fdfsUrl: pre: group1/M00/ server: http://118.89.217.246/ license: subject: license_hn_pms publicAlias: publicCert storePass: public_dhccmobile20181111 licensePath: D:/lic/license.lic publicKeysStorePath: D:/license/publicCerts.keystore