zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    【总结】java 后台文件上传整理
    【很重要】优秀的常用的js库
    封装常用的跨浏览器的事件对象EventUtil
    [H5表单]一些html5表单知识及EventUtil对象完善
    [H5表单]html5自带表单验证体验优化及提示气泡修改
    html5的audio实现高仿微信语音播放效果
    pcre
    tony_nginx_01_如何在linux系统下安装nginx、pcre、zlib、openssl工具
    Linux中编译、安装nginx
    Linux在本地使用yum安装软件
  • 原文地址:https://www.cnblogs.com/lgjava/p/13926585.html
Copyright © 2011-2022 走看看