赞
踩
SpringBoot常用配置信息
官方参考地址:https://docs.spring.io/spring-boot/docs/2.1.0.BUILD-SNAPSHOT/reference/htmlsingle/#common-application-properties
- #服务启动的端口号(用Tomcat运行时无效)
- server.port=8080
- #项目的部署名称(用Tomcat运行时无效)
- server.context-path=/SZAirPomDataSynch
-
- <!-------------------------数据库相关信息-------------------------------------------------------------->
-
- #数据库配置信息
- spring.datasource.driver-class-name =com.mysql.jdbc.Driver
- spring.datasource.url=jdbc:mysql://localhost:3306/studypay?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
- spring.datasource.username=liuhong
- spring.datasource.password=liuhong987
- spring.datasource.initialSize=30
- spring.datasource.minIdle=15
- spring.datasource.maxActive=100
- spring.datasource.minPoolSize=30
- spring.datasource.maxWait=60000000
-
- #如果不使用默认的数据库连接池 (com.zaxxer.hikari.HikariDataSource)
- spring.datasource.type =com.alibaba.druid.pool.DruidDataSource
-
- #配置druid连接池时用一下配置
- spring.datasource.druid.initial-size=10
- spring.datasource.druid.max-active=50
- spring.datasource.druid.min-idle=5
- spring.datasource.druid.max-wait=60000
-
-
- #mybatis 下划线转驼峰配置,两者都可以(在执行查询时将查询结果自动转换成对象)
- #mybatis.configuration.mapUnderscoreToCamelCase=true
- mybatis.configuration.map-underscore-to-camel-case=true
-
- #xml文件存放位置
- mybatis.mapper-locations=classpath*:mapper/*.xml
- #xml对应接口所在包名
- mybatis.type-aliases-package=com.roadtel.dao
- #打印sql,方便调试
- mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
- <!-------------------------数据库相关信息-------------------------------------------------------------->
- #pagehelper分页插件使用的配置
- pagehelper.helperDialect=mysql
- pagehelper.reasonable=true
- pagehelper.supportMethodsArguments=true
- pagehelper.params=count=countSql
- <!-------------------------Redis的相关配置--------------------------------------------------------------->
- #Redis的主机名
- spring.redis.host=1ocalhost
- # 连接URL,将覆盖主机,端口和密码(用户将被忽略),例如:redis://user:password@example.com:6379
- spring.redis.url=redis://user:password@example.com:6379
- # 使用的数据库(0-15),默认为0
- spring.redis.database=0
- spring.redis.password=
- #redis的端口号
- spring.redis.port=6379
- spring.redis.ssl=false
- #Redis连接超时
- spring.redis.timeout=30000
- spring.redis.jedis.pool.max-active=80
- spring.redis.jedis.pool.max-idle=50
- spring.redis.jedis.pool.max-wait=-1ms
- spring.redis.jedis.pool.min-idle=0
- #集群最大重定向数量
- spring.redis.cluster.max-redirects=15
- #Redis集群的服务器及端口号,用逗号隔开
- spring.redis.cluster.nodes=127.0.0.1:6379,127.0.0.1:6380
- # 哨兵监听的Redis server的名称
- spring.redis.sentinel.master=mymaster
- #哨兵的配置列表
- spring.redis.sentinel.nodes=127.0.0.1:26379,127.0.0.1:26479,127.0.0.1:26579
- <!-------------------------Redis的相关配置--------------------------------------------------------------->

Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。