1. 程式人生 > 其它 >elasticsearch 整合spring cloud Alibaba nacos 配置檔案

elasticsearch 整合spring cloud Alibaba nacos 配置檔案

# spring配置
spring: 
  redis:
    database: 6
    host: 192.168.8.248
    port: 6379
    password:
  elasticsearch:
    # es相關配置 Connecting to Elasticsearch using REST clients
    rest:
      uris: http://192.168.8.202:9200
      connection-timeout: 10s
      read-timeout: 10s
      username: elastic
      password: 
123456 # es相關配置 Connecting to Elasticsearch using Jest clients jest: uris: http://192.168.8.202:9200 connection-timeout: 10s read-timeout: 10s username: elastic password: 123456 # es相關配置 Connecting to Elasticsearch using Reactive REST clients data: elasticsearch: cluster
-name: huajun-elasticsearch cluster-nodes: 192.168.8.202:9300 repositories: enabled: true client: reactive: endpoints: 192.168.8.202:9200 use-ssl: false socket-timeout: 10s username: elastic password: 123456 datasource: druid: stat
-view-servlet: enabled: true loginUsername: admin loginPassword: 123456 dynamic: druid: initial-size: 5 min-idle: 5 maxActive: 20 maxWait: 60000 timeBetweenEvictionRunsMillis: 60000 minEvictableIdleTimeMillis: 300000 validationQuery: SELECT 1 FROM DUAL testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements: true maxPoolPreparedStatementPerConnectionSize: 20 filters: stat,wall,slf4j connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 datasource: # 主庫資料來源 master: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.8.248:3306/huajun-cloud-search?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai username: root password: root # 從庫資料來源 # slave: # username: # password: # url: # driver-class-name: # seata: true # 開啟seata代理,開啟後預設每個資料來源都代理,如果某個不需要代理可單獨關閉 # rabbitmq配置 rabbitmq: host: 192.168.8.201 username: admin password: admin port: 5672 publisher-confirms: true publisher-returns: true virtual-host: / listener: simple: acknowledge-mode: manual #消費者的最小數量 concurrency: 1 #消費者的最大數量 max-concurrency: 1 #是否支援重試 retry: enabled: true # 關閉es健康檢查 management: health: elasticsearch: enabled: false # seata配置 seata: # 預設關閉,如需啟用spring.datasource.dynami.seata需要同時開啟 enabled: false # Seata 應用編號,預設為 ${spring.application.name} application-id: ${spring.application.name} # Seata 事務組編號,用於 TC 叢集名 tx-service-group: ${spring.application.name}-group # 關閉自動代理 enable-auto-data-source-proxy: false config: type: nacos nacos: serverAddr: 192.168.8.201:8848 group: SEATA_GROUP namespace: ffbdf183-c35e-41ea-8166-e807b6968b93 registry: type: nacos nacos: application: seata-server server-addr: 192.168.8.201:8848 group: SEATA_GROUP namespace: ffbdf183-c35e-41ea-8166-e807b6968b93 # mybatis配置 mybatis-plus: # 搜尋指定包別名 typeAliasesPackage: com.huajun.search # 配置mapper的掃描,找到所有的mapper.xml對映檔案 mapperLocations: classpath:mapper/**/*.xml global-config: db-config: id-type: assign_uuid capital-mode: false logic-delete-field: delFlag # 全域性邏輯刪除的實體欄位名(since 3.3.0,配置後可以忽略不配置步驟2) logic-delete-value: 2 # 邏輯已刪除值(預設為 1) logic-not-delete-value: 0 # 邏輯未刪除值(預設為 0) # swagger配置 swagger: title: 示例程式介面文件 license: Powered By huajun licenseUrl: http://www.huajuntec.com.cn # xxl-job分散式任務配置 xxljob: adminAddresses: http://192.168.8.201:9080/xxl-job-admin accessToken: '' appname: ${spring.application.name} address: ip: port: 0 logPath: logRetentionDays: 30