• springboot整合nacos项目配置文件


    api工程下的配置文件

    1.application.properties

    server.port=8082
    spring.application.name=t-services-api

    2.bootstrap.properties

    spring.application.name=t-services-api
    spring.profiles.active=dev
    spring.nacos-host=10.12.113.55
    spring.nacos-port=8849
    spring.nacos-userName=nacos
    spring.nacos-password=rzx1218
    spring.nacos-namespace=059a08ae-db91-4178-ab38-6e188e09c9c0
    
    spring.cloud.nacos.config.server-addr=${spring.nacos-host}:${spring.nacos-port}
    spring.cloud.nacos.config.userName=${spring.nacos-userName}
    spring.cloud.nacos.config.password=${spring.nacos-password}
    spring.cloud.nacos.config.refresh.enabled=true
    spring.cloud.nacos.discovery.server-addr=${spring.nacos-host}:${spring.nacos-port}
    spring.cloud.nacos.config.userName=${spring.nacos-userName}
    spring.cloud.nacos.config.password=${spring.nacos-password}
    management.endpoints.web.exposure.include=*
    spring.cloud.nacos.config.namespace=${spring.nacos-namespace}
    spring.cloud.nacos.discovery.namespace=${spring.nacos-namespace}
    
    spring.cloud.nacos.config.shared-dataids=redis-config-${spring.profiles.active}.properties,mysql-jdbc-config-${spring.profiles.active}.properties
    spring.cloud.nacos.config.refreshable-dataids=redis-config-${spring.profiles.active}.properties,mysql-jdbc-config-${spring.profiles.active}.properties

    ck中的配置文件

    1.bootstrap.properties

    server.port=8083
    spring.application.name=t-services-ck
    spring.profiles.active=dev
    spring.nacos-host=10.12.113.55
    spring.nacos-port=8849
    spring.nacos-userName=nacos
    spring.nacos-password=rzx1218
    spring.nacos-namespace=059a08ae-db91-4178-ab38-6e188e09c9c0
    
    spring.cloud.nacos.config.server-addr=${spring.nacos-host}:${spring.nacos-port}
    spring.cloud.nacos.config.userName=${spring.nacos-userName}
    spring.cloud.nacos.config.password=${spring.nacos-password}
    spring.cloud.nacos.config.refresh.enabled=true
    spring.cloud.nacos.discovery.server-addr=${spring.nacos-host}:${spring.nacos-port}
    spring.cloud.nacos.config.userName=${spring.nacos-userName}
    spring.cloud.nacos.config.password=${spring.nacos-password}
    management.endpoints.web.exposure.include=*
    
    spring.cloud.nacos.config.namespace=${spring.nacos-namespace}
    spring.cloud.nacos.discovery.namespace=${spring.nacos-namespace}

    Nacos中的配置文件

    1.t-services-api-dev.properties

    mybatis.mapper-locations=classpath*:mybatis/**/*.xml
    mybatis.type-aliases-package=com.surfilter.api.entity
    logging.level.com.surfilter.api.dao=debug
    feign.client.config.feignName.connectTimeout=30000
    feign.client.config.feignName.readTimeout=30000
    feign.client.config.feignName.loggerLevel=full
    ribbon.ReadTimeout=120000
    ribbon.ConnectTimeout=30000
    ## 应用程序与Sentinel仪表板进行交互的端口
    ##spring.cloud.sentinel.transport.port=8719
    ##spring.cloud.sentinel.transport.dashboard=127.0.0.1:8080
    ## management.endpoints.web.exposure.include=*

    2.redis-config-dev.properties

    redis.config.host=10.12.113.20
    redis.config.port=9380
    redis.config.maxTotal=200
    redis.config.maxIdle=100
    redis.config.blockWhenExhausted=false
    redis.config.maxWaitMillis=3000
    redis.config.softMinEvictableIdleTimeMillis=10000
    spring.redis.host=10.12.113.20
    spring.redis.port=9380

    3.mysql-jdbc-config-dev.properties

    spring.url=jdbc:mysql://10.12.113.55:3306/t-pm2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&failOverReadOnly=false&useSSL=false&allowMultiQueries=true
    spring.username=root
    spring.password=rzx1218
    
    
    spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
    spring.datasource.url=${spring.url}
    spring.datasource.username=${spring.username}
    spring.datasource.password=${spring.password}
    spring.datasource.driverClassName=com.mysql.jdbc.Driver
    spring.datasource.minIdle=10
    spring.datasource.maxActive=20
    spring.datasource.initialSize=10
    spring.datasource.timeBetweenEvictionRunsMillis=3000
    spring.datasource.minEvictableIdleTimeMillis=3000000
    spring.datasource.validationQuery=SELECT 'ZTM' FROM DUAL
    spring.datasource.validationQueryTimeout=10000
    spring.datasource.testWhileIdle=true
    spring.datasource.testOnBorrow=true
    spring.datasource.testOnReturn=false
    spring.datasource.maxWait=60000
    spring.datasource.poolPreparedStatements=true
    spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
    spring.datasource.maxPoolSize=20
    spring.datasource.minPoolSize=10
    spring.datasource.borrowConnectionTimeout=60
    
    spring.datasource.mysql.jdbc-url=${spring.url}
    spring.datasource.mysql.username=${spring.username}
    spring.datasource.mysql.password=${spring.password}
    spring.datasource.mysql.driver-class-name=com.mysql.jdbc.Driver
    spring.datasource.mysql.min-idle=10
    spring.datasource.mysql.max-active=20
    spring.datasource.mysql.initial-size=10

    4.t-services-ck-dev.properties

    mybatis.mapper-locations=classpath*:mybatis/**/*.xml
    logging.level.com.surfilter.ck.dao=debug
    spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
    clickhouse.driverClassName=ru.yandex.clickhouse.ClickHouseDriver
    clickhouse.url=jdbc:clickhouse://10.12.113.55:8123/t_project?socket_timeout=600000
    clickhouse.username=default
    clickhouse.password=rzx1218
    clickhouse.initialSize=10
    clickhouse.maxActive=100
    clickhouse.minIdle=10
    clickhouse.maxWait=6000

    5.t-services-mq-dev.properties

    spring.rabbitmq.host=10.12.113.20
    spring.rabbitmq.port=5672
    spring.rabbitmq.username=dky
    spring.rabbitmq.password=123456
    #监听重试是否可用
    spring.rabbitmq.listener.simple.retry.enabled=true
    #最大重试次数
    spring.rabbitmq.listener.simple.retry.max-attempts=5
    #第一次和第二次尝试发布或传递消息之间的间隔
    spring.rabbitmq.listener.simple.retry.initial-interval=2000
    #开启confirm确认
    spring.rabbitmq.publisher-confirms=true
    # 开启发送失败退回
    spring.rabbitmq.publisher-returns=true
    # 开启ACK
    spring.rabbitmq.listener.direct.acknowledge-mode=manual
    spring.rabbitmq.listener.simple.acknowledge-mode=manual
    rabbitmq.replyTimeout=6000
    rabbitmq.x-max-length=1
    rabbitmq.x-message-ttl=3000

    6.t-services-xxl-dev.properties

    logging.level.com.xxl.job.executor.dao=debug
    feign.client.config.feignName.connectTimeout=30000
    feign.client.config.feignName.readTimeout=30000
    feign.client.config.feignName.loggerLevel=full
    ribbon.ReadTimeout=120000
    ribbon.ConnectTimeout=30000
    
    # log config
    logging.config=classpath:logback.xml
    ### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
    xxl.job.admin.addresses=http://10.12.113.20:8080/xxl-job-admin
    
    ### xxl-job executor address
    xxl.job.executor.appname=t-project
    xxl.job.executor.ip=10.12.113.55
    xxl.job.executor.port=39999
    ### xxl-job, access token
    xxl.job.accessToken=
    
    ### xxl-job log path
    xxl.job.executor.logpath=log/jobhandler
    ### xxl-job log retention days
    xxl.job.executor.logretentiondays=30
    
    mybatis.mapper-locations=classpath*:mybatis/**/*.xml
    logging.level.com.xxl.job.executor.dao.log=info
    com.xxl.job.executor.controller.delete-config=30

    7.t-services-ws-dev.properties

    mybatis.mapper-locations=classpath*:mybatis/**/*.xml
    mybatis.type-aliases-package=com.surfilter.entity
    logging.level.com.surfilter.api.dao=debug
    feign.client.config.feignName.connectTimeout=30000
    feign.client.config.feignName.readTimeout=30000
    feign.client.config.feignName.loggerLevel=full
    ribbon.ReadTimeout=120000
    ribbon.ConnectTimeout=30000
    
    dp.webservice.username=test123
    dp.webservice.password=Abc!@#4567
    dp.webservice.address=http://60.12.13.75:8888

    8.t-services-neo4j-dev.properties

    spring.data.neo4j.uri=bolt://10.12.113.20:7687
    spring.data.neo4j.username=neo4j
    spring.data.neo4j.password=rzx1218
    com.rzx.neo4j.service.level=2
  • 相关阅读:
    贝叶斯分类
    K-Means算法
    python数组
    深度学习与神经网络
    数据挖掘算法之-关联规则挖掘(Association Rule)
    k8s记录-pip源配置
    k8s记录-yum本地仓库部署
    k8s记录-不同集群服务互联
    k8s记录-kube-dns(core-dns)配置(七)
    k8s记录-kubectl常用
  • 原文地址:https://www.cnblogs.com/lgjava/p/13926585.html
Copyright © 2020-2023  润新知