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
SpringBoot配置文件,eureka的基本配置
最新推荐文章于 2024-09-10 15:05:34 发布