SpringBoot配置文件,eureka的基本配置

spring.profiles.active=local

# ----------------------------------Service Base-----------------------------------------------------------
spring.application.name=XXX
server.port=XXXX

#eureka
#eureka默认服务地址
eureka.client.serviceUrl.defaultZone=http://${host-eureka}:9001/eureka/

eureka.client.serviceUrl.register-with-eureka=true
eureka.client.serviceUrl.fetch-registry=true
eureka.instance.prefer-ip-address=true
#实例url指向 主机ip+端口号      不加的话url指向的依然是主机名+端口号
eureka.instance.hostname= ${spring.cloud.client.ip-address}
#Spring Cloud下配置eureka.instance.instance-id使得服务实例在eureka界面增加显示版本号
#SpringCloud体系里的,服务实体向eureka注册时,注册名默认是“IP名:应用名:应用端口名”,即${spring.cloud.client.ipAddress}:${sprin.application.name}:${spring.application.instance_id:${server.port}}
eureka.instance.instance-id=${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}:@project.version@

# DATABASE CONNECTION
spring.datasource.url=jdbc:mysql://${host-db}:3306/XXXX?characterEncoding=UTF-8&useSSL=true
spring.datasource.username=${db-username}
spring.datasource.password=${db-password}

#DATABASE CONNECTION POOL
spring.datasource.druid.initial-size=1
spring.datasource.druid.min-idle=1
spring.datasource.druid.max-active=20
spring.datasource.druid.max-wait=60000
spring.datasource.druid.time-between-eviction-runs-millis=60000
spring.datasource.druid.min-evictable-idle-time-millis=300000
spring.datasource.druid.validation-query=SELECT 'x'
spring.datasource.druid.test-while-idle=true
spring.datasource.druid.test-on-borrow=false
spring.datasource.druid.test-on-return=false
spring.datasource.druid.pool-prepared-statements=false
spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20


# mybatis
#mybatis.type-aliases-package=${aliases-package}
#mybatis.mapper-locations=${mapper-locations}
mybatis.mapper-locations=classpath:mapper/*.xml
mybatis.configuration.map-underscore-to-camel-case=true
#insert、update是否判断字符串类型!='' 即 test="str != null"表达式内是否追加 and str != ''
mapper.not-empty=false
#主键生成策略:主键自增
mapper.identity=MYSQL

#pagehelper
pagehelper.auto-dialect=mysql
pagehelper.reasonable=true
pagehelper.support-methods-arguments=true
pagehelper.params=count=countSql

#----------------------- LOG --------------------------------
#mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl

#tomcat
#server.tomcat.basedir= /ilike/logs/tomcat/${spring.application.name}
#server.tomcat.accesslog.buffered= true
#server.tomcat.accesslog.enabled= true
#server.tomcat.accesslog.file-date-format= .yyyy-MM-dd
#server.tomcat.accesslog.pattern=   common
#server.tomcat.accesslog.prefix= access_log
#server.tomcat.accesslog.rename-on-rotate= false
#server.tomcat.accesslog.request-attributes-enabled= false
#server.tomcat.accesslog.rotate= true
#server.tomcat.accesslog.suffix= .log
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值