├── .idea ├── compiler.xml ├── encodings.xml ├── inspectionProfiles │ └── Project_Default.xml ├── misc.xml └── vcs.xml ├── README.md ├── auth-dev.yml ├── cart-dev.yml ├── comments-dev.yml ├── gateway-dev.yml ├── goodsweb-dev.yml ├── item-dev.yml ├── leyou-config.iml ├── order-dev.yml ├── pom.xml ├── registry-dev.yml ├── search-dev.yml ├── seckill-dev.yml ├── sms-dev.yml ├── test-dev.yml ├── upload-dev.yml └── user-dev.yml /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lyj8330328/leyou-config/063130484a5c9ea030833f274f4a176c290e75b3/README.md -------------------------------------------------------------------------------- /auth-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8087 3 | spring: 4 | application: 5 | name: auth-service 6 | rabbitmq: 7 | virtual-host: /leyou 8 | username: /leyou 9 | password: leyou 10 | host: 192.168.19.121 11 | eureka: 12 | client: 13 | service-url: 14 | defaultZone: http://127.0.0.1:10086/eureka 15 | registry-fetch-interval-seconds: 10 16 | instance: 17 | instance-id: ${spring.application.name}:${server.port} 18 | prefer-ip-address: true #当你获取host时,返回的不是主机名,而是ip 19 | ip-address: 127.0.0.1 20 | lease-expiration-duration-in-seconds: 10 #10秒不发送九过期 21 | lease-renewal-interval-in-seconds: 5 #每隔5秒发一次心跳 22 | leyou: 23 | jwt: 24 | secret: leyou@Login(Auth}*^31)&heiMa% # 登录校验的密钥 25 | pubKeyPath: G:\\tmp\\rsa\\rsa.pub # 公钥地址 26 | priKeyPath: G:\\tmp\\rsa\\rsa.pri # 私钥地址 27 | expire: 30 # 过期时间,单位分钟 28 | cookieName: LY_TOKEN 29 | cookieMaxAge: 30 30 | 31 | ribbon: 32 | ConnectTimeout: 4000 # 连接超时时间(ms) 33 | ReadTimeout: 2000 # 通信超时时间(ms) 34 | OkToRetryOnAllOperations: true # 是否对所有操作重试 35 | MaxAutoRetriesNextServer: 1 # 同一服务不同实例的重试次数 36 | MaxAutoRetries: 1 # 同一实例的重试次数 37 | hystrix: 38 | command: 39 | default: 40 | execution: 41 | isolation: 42 | thread: 43 | timeoutInMillisecond: 10000 # 熔断超时时长:10000ms -------------------------------------------------------------------------------- /cart-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8088 3 | spring: 4 | application: 5 | name: cart-service 6 | redis: 7 | host: 192.168.19.121 8 | rabbitmq: 9 | virtual-host: /leyou 10 | username: /leyou 11 | password: leyou 12 | host: 192.168.19.121 13 | eureka: 14 | client: 15 | service-url: 16 | defaultZone: http://127.0.0.1:10086/eureka 17 | registry-fetch-interval-seconds: 10 18 | instance: 19 | instance-id: ${spring.application.name}:${server.port} 20 | prefer-ip-address: true #当你获取host时,返回的不是主机名,而是ip 21 | ip-address: 127.0.0.1 22 | lease-expiration-duration-in-seconds: 10 #10秒不发送九过期 23 | lease-renewal-interval-in-seconds: 5 #每隔5秒发一次心跳 24 | 25 | ribbon: 26 | ConnectTimeout: 4000 # 连接超时时间(ms) 27 | ReadTimeout: 2000 # 通信超时时间(ms) 28 | OkToRetryOnAllOperations: true # 是否对所有操作重试 29 | MaxAutoRetriesNextServer: 1 # 同一服务不同实例的重试次数 30 | MaxAutoRetries: 1 # 同一实例的重试次数 31 | hystrix: 32 | command: 33 | default: 34 | execution: 35 | isolation: 36 | thread: 37 | timeoutInMillisecond: 10000 # 熔断超时时长:10000ms 38 | 39 | leyou: 40 | jwt: 41 | cookieName: LY_TOKEN 42 | pubKeyPath: G:\\tmp\\rsa\\rsa.pub # 公钥地址 -------------------------------------------------------------------------------- /comments-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8092 3 | tomcat: 4 | max-connections: 5000 5 | spring: 6 | application: 7 | name: comments-service 8 | data: 9 | mongodb: 10 | host: 192.168.19.121 11 | database: leyoudb 12 | datasource: 13 | url: jdbc:mysql://127.0.0.1:3306/leyou?characterEncoding=UTF-8&useSSL=false 14 | username: root 15 | password: 123456 16 | hikari: 17 | maximum-pool-size: 20 18 | minimum-idle: 10 19 | rabbitmq: 20 | virtual-host: /leyou 21 | username: /leyou 22 | password: leyou 23 | host: 192.168.19.121 24 | redis: 25 | host: 192.168.19.121 26 | jackson: 27 | default-property-inclusion: non_null # 配置json处理时忽略空值 28 | eureka: 29 | client: 30 | service-url: 31 | defaultZone: http://127.0.0.1:10086/eureka 32 | registry-fetch-interval-seconds: 5 33 | instance: 34 | instance-id: ${spring.application.name}:${server.port} 35 | prefer-ip-address: true #当你获取host时,返回的不是主机名,而是ip 36 | ip-address: 127.0.0.1 37 | lease-expiration-duration-in-seconds: 10 #10秒不发送九过期 38 | lease-renewal-interval-in-seconds: 5 #每隔5秒发一次心跳 39 | ribbon: 40 | ConnectTimeout: 4000 # 连接超时时间(ms) 41 | ReadTimeout: 2000 # 通信超时时间(ms) 42 | OkToRetryOnAllOperations: true # 是否对所有操作重试 43 | MaxAutoRetriesNextServer: 1 # 同一服务不同实例的重试次数 44 | MaxAutoRetries: 1 # 同一实例的重试次数 45 | 46 | leyou: 47 | worker: 48 | workerId: 2 49 | dataCenterId: 2 50 | jwt: 51 | cookieName: LY_TOKEN 52 | pubKeyPath: G:\\tmp\\rsa\\rsa.pub # 公钥地址 -------------------------------------------------------------------------------- /gateway-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 10010 3 | spring: 4 | application: 5 | name: api-gateway 6 | rabbitmq: 7 | virtual-host: /leyou 8 | username: /leyou 9 | password: leyou 10 | host: 192.168.19.121 11 | eureka: 12 | client: 13 | service-url: 14 | defaultZone: http://127.0.0.1:10086/eureka 15 | registry-fetch-interval-seconds: 5 16 | instance: 17 | instance-id: ${spring.application.name}:${server.port} 18 | prefer-ip-address: true #当你获取host时,返回的不是主机名,而是ip 19 | ip-address: 127.0.0.1 20 | 21 | zuul: 22 | prefix: /api # 添加路由前缀 23 | retryable: true 24 | routes: 25 | item-service: /item/** #商品微服务 26 | search-service: /search/** #搜索微服务 27 | user-service: /user/** #用户微服务 28 | auth-service: /auth/** #授权中心微服务 29 | cart-service: /cart/** #购物车微服务 30 | order-service: /** #订单微服务 31 | seckill-service: /seckill/** #秒杀微服务 32 | comments-service: /review/** #评论微服务 33 | ignored-services: 34 | - upload-service # 忽略upload-service服务 35 | add-host-header: true #携带请求本身的head头信息 36 | sensitive-headers: #匹配禁止使用的头信息,这里设置为null,否则set-cookie无效 37 | ribbon: 38 | ConnectTimeout: 4000 # 连接超时时间(ms) 39 | ReadTimeout: 2000 # 通信超时时间(ms) 40 | OkToRetryOnAllOperations: true # 是否对所有操作重试 41 | MaxAutoRetriesNextServer: 1 # 同一服务不同实例的重试次数 42 | MaxAutoRetries: 1 # 同一实例的重试次数 43 | hystrix: 44 | command: 45 | default: 46 | execution: 47 | isolation: 48 | thread: 49 | timeoutInMillisecond: 10000 # 熔断超时时长:10000ms 50 | leyou: 51 | jwt: 52 | cookieName: LY_TOKEN 53 | pubKeyPath: G:\\tmp\\rsa\\rsa.pub # 公钥地址 54 | filter: 55 | allowPaths: 56 | /api/auth 57 | /api/search 58 | /api/user/register 59 | /api/user/check 60 | /api/user/code 61 | /api/item -------------------------------------------------------------------------------- /goodsweb-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8084 3 | spring: 4 | application: 5 | name: goods-page-service 6 | thymeleaf: 7 | cache: false 8 | rabbitmq: 9 | host: 192.168.19.121 10 | username: /leyou 11 | password: leyou 12 | virtual-host: /leyou 13 | redis: 14 | host: 192.168.19.121 15 | eureka: 16 | client: 17 | service-url: 18 | defaultZone: http://127.0.0.1:10086/eureka 19 | registry-fetch-interval-seconds: 5 20 | instance: 21 | instance-id: ${spring.application.name}:${server.port} 22 | prefer-ip-address: true #当你获取host时,返回的不是主机名,而是ip 23 | ip-address: 127.0.0.1 24 | lease-expiration-duration-in-seconds: 10 #10秒不发送九过期 25 | lease-renewal-interval-in-seconds: 5 #每隔5秒发一次心跳 26 | 27 | ribbon: 28 | ConnectTimeout: 4000 # 连接超时时间(ms) 29 | ReadTimeout: 2000 # 通信超时时间(ms) 30 | OkToRetryOnAllOperations: true # 是否对所有操作重试 31 | MaxAutoRetriesNextServer: 1 # 同一服务不同实例的重试次数 32 | MaxAutoRetries: 1 # 同一实例的重试次数 33 | hystrix: 34 | command: 35 | default: 36 | execution: 37 | isolation: 38 | thread: 39 | timeoutInMillisecond: 10000 # 熔断超时时长:10000ms -------------------------------------------------------------------------------- /item-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8081 3 | spring: 4 | application: 5 | name: item-service 6 | datasource: 7 | url: jdbc:mysql://127.0.0.1:3306/leyou?characterEncoding=UTF-8&useSSL=false 8 | username: root 9 | password: 123456 10 | hikari: 11 | maximum-pool-size: 20 12 | minimum-idle: 10 13 | redis: 14 | host: 192.168.19.121 15 | rabbitmq: 16 | host: 192.168.19.121 17 | username: /leyou 18 | password: leyou 19 | virtual-host: /leyou 20 | template: 21 | retry: 22 | enabled: true 23 | multiplier: 2 24 | initial-interval: 10000ms 25 | max-interval: 210000ms 26 | exchange: leyou.item.exchange 27 | publisher-confirms: true 28 | eureka: 29 | client: 30 | service-url: 31 | defaultZone: http://127.0.0.1:10086/eureka 32 | registry-fetch-interval-seconds: 5 33 | instance: 34 | instance-id: ${spring.application.name}:${server.port} 35 | prefer-ip-address: true #当你获取host时,返回的不是主机名,而是ip 36 | ip-address: 127.0.0.1 37 | lease-renewal-interval-in-seconds: 5 38 | lease-expiration-duration-in-seconds: 10 39 | 40 | ribbon: 41 | ConnectTimeout: 4000 # 连接超时时间(ms) 42 | ReadTimeout: 2000 # 通信超时时间(ms) 43 | OkToRetryOnAllOperations: true # 是否对所有操作重试 44 | MaxAutoRetriesNextServer: 1 # 同一服务不同实例的重试次数 45 | MaxAutoRetries: 1 # 同一实例的重试次数 46 | hystrix: 47 | command: 48 | default: 49 | execution: 50 | isolation: 51 | thread: 52 | timeoutInMillisecond: 10000 # 熔断超时时长:10000ms -------------------------------------------------------------------------------- /leyou-config.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /order-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8089 3 | spring: 4 | application: 5 | name: order-service 6 | datasource: 7 | url: jdbc:mysql://127.0.0.1:3306/leyou?useUnicode=true&characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false 8 | username: root 9 | password: 123456 10 | hikari: 11 | maximum-pool-size: 200 12 | minimum-idle: 100 13 | rabbitmq: 14 | host: 192.168.19.121 15 | username: /leyou 16 | password: leyou 17 | virtual-host: /leyou 18 | template: 19 | queue: leyou.order.delay.queue 20 | publisher-confirms: true 21 | redis: 22 | host: 192.168.19.121 23 | eureka: 24 | client: 25 | service-url: 26 | defaultZone: http://127.0.0.1:10086/eureka 27 | registry-fetch-interval-seconds: 5 28 | instance: 29 | instance-id: ${spring.application.name}:${server.port} 30 | prefer-ip-address: true #当你获取host时,返回的不是主机名,而是ip 31 | ip-address: 127.0.0.1 32 | lease-renewal-interval-in-seconds: 5 33 | lease-expiration-duration-in-seconds: 10 34 | 35 | mybatis: 36 | type-aliases-package: com.leyou.order.pojo 37 | mapper-locations: mapper/OrderMapper.xml 38 | 39 | ribbon: 40 | ConnectTimeout: 4000 # 连接超时时间(ms) 41 | ReadTimeout: 2000 # 通信超时时间(ms) 42 | OkToRetryOnAllOperations: true # 是否对所有操作重试 43 | MaxAutoRetriesNextServer: 1 # 同一服务不同实例的重试次数 44 | MaxAutoRetries: 1 # 同一实例的重试次数 45 | hystrix: 46 | command: 47 | default: 48 | execution: 49 | isolation: 50 | thread: 51 | timeoutInMillisecond: 10000 # 熔断超时时长:10000ms 52 | 53 | leyou: 54 | worker: 55 | workerId: 1 56 | dataCenterId: 1 57 | jwt: 58 | cookieName: LY_TOKEN 59 | pubKeyPath: G:\\tmp\\rsa\\rsa.pub # 公钥地址 60 | pay: 61 | appId: wx8397f8696b538317 62 | mchId: 1473426802 63 | key: T6m9iK73b0kn9g5v426MKfHQH7X8rKwb 64 | connectTimeoutMs: 5000 65 | readTimeoutMs: 10000 66 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.leyou.config 8 | leyou-config 9 | 1.0-SNAPSHOT 10 | 11 | 12 | -------------------------------------------------------------------------------- /registry-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 10086 3 | spring: 4 | application: 5 | name: ly-registry 6 | rabbitmq: 7 | virtual-host: /leyou 8 | username: /leyou 9 | password: leyou 10 | host: 192.168.19.121 11 | eureka: 12 | client: 13 | fetch-registry: false 14 | register-with-eureka: false 15 | service-url: 16 | defaultZone: http://127.0.0.1:10086/eureka 17 | server: 18 | enable-self-preservation: false #关闭自我保护 19 | eviction-interval-timer-in-ms: 5000 #每隔5秒进行一次服务列表清理 20 | 21 | ribbon: 22 | ConnectTimeout: 4000 # 连接超时时间(ms) 23 | ReadTimeout: 2000 # 通信超时时间(ms) 24 | OkToRetryOnAllOperations: true # 是否对所有操作重试 25 | MaxAutoRetriesNextServer: 1 # 同一服务不同实例的重试次数 26 | MaxAutoRetries: 1 # 同一实例的重试次数 27 | hystrix: 28 | command: 29 | default: 30 | execution: 31 | isolation: 32 | thread: 33 | timeoutInMillisecond: 10000 # 熔断超时时长:10000ms -------------------------------------------------------------------------------- /search-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8083 3 | spring: 4 | application: 5 | name: search-service 6 | data: 7 | elasticsearch: 8 | cluster-name: elasticsearch 9 | cluster-nodes: 192.168.19.121:9300 10 | rabbitmq: 11 | virtual-host: /leyou 12 | username: /leyou 13 | password: leyou 14 | host: 192.168.19.121 15 | jackson: 16 | default-property-inclusion: non_null # 配置json处理时忽略空值 17 | resources: 18 | add-mappings: true 19 | chain: 20 | enabled: true 21 | gzipped: true 22 | html-application-cache: true 23 | cache: 24 | period: 3600m 25 | eureka: 26 | client: 27 | service-url: 28 | defaultZone: http://127.0.0.1:10086/eureka 29 | registry-fetch-interval-seconds: 5 30 | instance: 31 | instance-id: ${spring.application.name}:${server.port} 32 | prefer-ip-address: true #当你获取host时,返回的不是主机名,而是ip 33 | ip-address: 127.0.0.1 34 | lease-expiration-duration-in-seconds: 10 #10秒不发送九过期 35 | lease-renewal-interval-in-seconds: 5 #每隔5秒发一次心跳 36 | -------------------------------------------------------------------------------- /seckill-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8090 3 | tomcat: 4 | max-connections: 5000 5 | spring: 6 | application: 7 | name: seckill-service 8 | data: 9 | elasticsearch: 10 | cluster-name: elasticsearch 11 | cluster-nodes: 192.168.19.121:9300 12 | datasource: 13 | url: jdbc:mysql://127.0.0.1:3306/leyou?characterEncoding=UTF-8&useSSL=false 14 | username: root 15 | password: 123456 16 | driver-class-name: com.mysql.jdbc.Driver 17 | hikari: 18 | maximum-pool-size: 20 19 | minimum-idle: 10 20 | rabbitmq: 21 | virtual-host: /leyou 22 | username: /leyou 23 | password: leyou 24 | host: 192.168.19.121 25 | template: 26 | exchange: leyou.order.exchange 27 | publisher-confirms: true 28 | redis: 29 | host: 192.168.19.121 30 | jackson: 31 | default-property-inclusion: non_null # 配置json处理时忽略空值 32 | resources: 33 | add-mappings: true 34 | chain: 35 | enabled: true 36 | gzipped: true 37 | html-application-cache: true 38 | cache: 39 | period: 3600m 40 | eureka: 41 | client: 42 | service-url: 43 | defaultZone: http://127.0.0.1:10086/eureka 44 | registry-fetch-interval-seconds: 5 45 | instance: 46 | instance-id: ${spring.application.name}:${server.port} 47 | prefer-ip-address: true #当你获取host时,返回的不是主机名,而是ip 48 | ip-address: 127.0.0.1 49 | lease-expiration-duration-in-seconds: 10 #10秒不发送九过期 50 | lease-renewal-interval-in-seconds: 5 #每隔5秒发一次心跳 51 | ribbon: 52 | ConnectTimeout: 4000 # 连接超时时间(ms) 53 | ReadTimeout: 2000 # 通信超时时间(ms) 54 | OkToRetryOnAllOperations: true # 是否对所有操作重试 55 | MaxAutoRetriesNextServer: 1 # 同一服务不同实例的重试次数 56 | MaxAutoRetries: 1 # 同一实例的重试次数 57 | hystrix: 58 | command: 59 | default: 60 | execution: 61 | isolation: 62 | thread: 63 | timeoutInMillisecond: 10000 # 熔断超时时长:10000ms 64 | 65 | leyou: 66 | jwt: 67 | cookieName: LY_TOKEN 68 | pubKeyPath: G:\\tmp\\rsa\\rsa.pub # 公钥地址 -------------------------------------------------------------------------------- /sms-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8086 3 | spring: 4 | application: 5 | name: sms-service 6 | rabbitmq: 7 | virtual-host: /leyou 8 | username: /leyou 9 | password: leyou 10 | host: 192.168.19.121 11 | 12 | leyou: 13 | sms: 14 | accessKeyId: LTAIc259TULYzaS7 15 | accessKeySecret: 1uh79I1UAmwQ4YWsSmOgxw7JEBGA0v 16 | signName: 乐优商城 17 | verifyCodeTemplate: SMS_148614415 18 | -------------------------------------------------------------------------------- /test-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8091 3 | spring: 4 | application: 5 | name: test-service 6 | datasource: 7 | url: jdbc:mysql://127.0.0.1:3306/leyou?characterEncoding=UTF-8&useSSL=false 8 | username: root 9 | password: 123456 10 | hikari: 11 | maximum-pool-size: 20 12 | minimum-idle: 10 13 | rabbitmq: 14 | host: 192.168.19.121 15 | data: 16 | mongodb: 17 | host: localhost 18 | database: spitdb 19 | eureka: 20 | client: 21 | service-url: 22 | defaultZone: http://127.0.0.1:10086/eureka 23 | registry-fetch-interval-seconds: 5 24 | instance: 25 | instance-id: ${spring.application.name}:${server.port} 26 | prefer-ip-address: true #当你获取host时,返回的不是主机名,而是ip 27 | ip-address: 127.0.0.1 28 | lease-renewal-interval-in-seconds: 5 29 | lease-expiration-duration-in-seconds: 10 30 | ip: 31 | t: 32 | w: 12312123 33 | 34 | leyou: 35 | jwt: 36 | cookieName: LY_TOKEN 37 | pubKeyPath: G:\\tmp\\rsa\\rsa.pub # 公钥地址 38 | filter: 39 | allowPaths: 40 | /api/auth 41 | /api/search 42 | /api/user/register 43 | /api/user/check 44 | /api/user/code 45 | /api/item -------------------------------------------------------------------------------- /upload-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8082 3 | spring: 4 | application: 5 | name: upload-service 6 | rabbitmq: 7 | virtual-host: /leyou 8 | username: /leyou 9 | password: leyou 10 | host: 192.168.19.121 11 | servlet: 12 | multipart: 13 | max-file-size: 10MB # 限制文件上传的大小 14 | # Eureka 15 | eureka: 16 | client: 17 | service-url: 18 | defaultZone: http://127.0.0.1:10086/eureka 19 | instance: 20 | lease-renewal-interval-in-seconds: 5 # 每隔5秒发送一次心跳 21 | lease-expiration-duration-in-seconds: 10 # 10秒不发送就过期 22 | prefer-ip-address: true 23 | ip-address: 127.0.0.1 24 | instance-id: ${spring.application.name}:${server.port} 25 | fdfs: 26 | so-timeout: 1501 #超时时间 27 | connect-timeout: 601 #连接超时时间 28 | thumb-image: # 缩略图 29 | width: 60 30 | height: 60 31 | tracker-list: # tracker地址 32 | - 192.168.19.121:22122 -------------------------------------------------------------------------------- /user-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8085 3 | spring: 4 | application: 5 | name: user-service 6 | datasource: 7 | url: jdbc:mysql://127.0.0.1:3306/leyou?characterEncoding=UTF-8&useSSL=false 8 | username: root 9 | password: 123456 10 | hikari: 11 | maximum-pool-size: 20 12 | minimum-idle: 10 13 | redis: 14 | host: 192.168.19.121 15 | rabbitmq: 16 | host: 192.168.19.121 17 | username: /leyou 18 | password: leyou 19 | virtual-host: /leyou 20 | template: 21 | retry: 22 | enabled: true 23 | max-interval: 210000ms 24 | initial-interval: 10000ms 25 | multiplier: 2 26 | publisher-confirms: true 27 | eureka: 28 | client: 29 | service-url: 30 | defaultZone: http://127.0.0.1:10086/eureka 31 | registry-fetch-interval-seconds: 5 32 | instance: 33 | instance-id: ${spring.application.name}:${server.port} 34 | prefer-ip-address: true #当你获取host时,返回的不是主机名,而是ip 35 | ip-address: 127.0.0.1 36 | lease-renewal-interval-in-seconds: 5 37 | lease-expiration-duration-in-seconds: 15 38 | ribbon: 39 | ConnectTimeout: 4000 # 连接超时时间(ms) 40 | ReadTimeout: 2000 # 通信超时时间(ms) 41 | OkToRetryOnAllOperations: true # 是否对所有操作重试 42 | MaxAutoRetriesNextServer: 1 # 同一服务不同实例的重试次数 43 | MaxAutoRetries: 1 # 同一实例的重试次数 44 | hystrix: 45 | command: 46 | default: 47 | execution: 48 | isolation: 49 | thread: 50 | timeoutInMillisecond: 10000 # 熔断超时时长:10000ms 51 | mybatis: 52 | type-aliases-package: com.leyou.user.pojo 53 | --------------------------------------------------------------------------------