1. 程式人生 > >【Spring】EUREKA配置

【Spring】EUREKA配置

client location time test tween strong ear table use

HDD_EUREKA_SERVER
application.yml

server:
  port: 8101
eureka:
  instance:
    hostname: localhost
  client:
    register-with-eureka: false
    fetch-registry: false
==============================================================
HDD_SHIPPING_SERVICE
application.yml

server:
  port: 8084
logging:


  config: classpath:logback.xml
  level:
    org.springframework: error
    com.ibatis: debug
spring:
  datasource:
    url: jdbc:mysql://10.19.4.16:3306/hdd_yttmb_stp?useUnicode=true&characterEncoding=utf-8
    username: sa
    password: mysql
    type: com.alibaba.druid.pool.DruidDataSource

    druid:
      max-active: 20
      initial-size: 1
      min-idle: 3
      max-wait: 60000
      time-between-eviction-runs-millis: 60000
      min-evictable-idle-time-millis: 300000
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false

mybatis:
  mapperLocations: classpath*:net/huadong/*/*/mapper/*.xml
  configLocation: classpath:mybatis-config.xml
debug: true
——————————————————————————————————————————————————————————————————————————————
bootstrap.yml

spring:
  application:
    name: shippingService
  cloud:
    config:
      enabled: true
      discovery:
        enabled: true
        service-id: config #1
eureka:
  instance:
    non-secure-port: ${server.port:8084}
  client:
    service-url:
      defaultZone: http://${eureka.host:localhost}:${eureka.port:8101}/eureka/
=================================================================================================
HDD_SHIPPING_WEB
application.yml

server:
  port: 80

kaptcha:
  session:
    key: KAPTCHA_SESSION_KEY
  obscurificator:
    impl: com.google.code.kaptcha.impl.ShadowGimpy
  noise:
    impl: com.google.code.kaptcha.impl.NoNoise
  image:
    width: 90
    height: 33
  textproducer:
    font:
      size: 26
      color: black
    char:
      length: 4
      space: 5

  background:
    clear:
      from: 247,247,247
      to: 247,247,247
————————————————————————————————————————————————————————————————————————
bootstrap.yml

spring:
  application:
    name: web

eureka:
  instance:
    non-secure-port: ${server.port:80}
  client:
    service-url:
      defaultZone: http://${eureka.host:localhost}:${eureka.port:8101}/eureka/

【Spring】EUREKA配置