1 Star 0 Fork 0

李白2586/springcloud

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
service-3.yml 2.76 KB
一键复制 编辑 原始数据 按行查看 历史
CNBssac 提交于 2023-12-25 16:16 . for yml
server:
port: 8082
spring:
application:
name: service2
#配置druid数据源
datasource:
# 数据源基本配置
username: root
password: 123456
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://159.75.167.182:3307/hsj666?useSSL=false&autoReconnect=true&characterEncoding=UTF-8
type: com.alibaba.druid.pool.DruidDataSource
# 数据源其他配置
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
filters: stat,wall,log4j
maxPoolPreparedStatementPerConnectionSize: 20
useGlobalDataSourceStat: true
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500
# 配置文件上传功能
servlet:
multipart:
# 最大文件大小
max-file-size: 10MB
# 最大请求大小
max-request-size: 10MB
# 临时文件大小阈值
file-size-threshold: 10MB
# 是否启用文件上传
enabled: true
#配置mybatis
mybatis:
# 搜索指定包别名
typeAliasesPackage: com.gxuwz.lab
#映射文件xml的路径
mapper-locations: classpath:Mapper/*Mapper.xml
# 加载全局的配置文件
configLocation: classpath:mybatis/mybatis-config.xml
#分页插件
pagehelper:
#设置数据库
helper-dialect: mysql
#设置为true时,会将RowBounds第一个参数offset当成pageNum页码使用
offset-as-page-num: true
#设置为true时,使用RowBounds分页会进行count查询
row-bounds-with-count: true
#启用合理化时,如果pageNum<1会查询第一页,如果pageNum>pages会查询最后一页
reasonable: true
#设置为true时,如果pageSize=0或者RowBounds.limit = 0就会查询出全部的结果
page-size-zero: true
location: ./src/fileUploaded # 设置上传的临时目录
# redis 配置
redis:
# 地址
host: localhost
# 端口,默认为6379
port: 6379
# 密码
password:
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 连接池的最大数据库连接数
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
#eureka配置
eureka:
client:
registerWithEureka: true
fetchRegistry: true
service-url:
defaultZone: http://localhost:8888/eureka
instance:
prefer-ip-address: true
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/li-bai-2586/springcloud.git
git@gitee.com:li-bai-2586/springcloud.git
li-bai-2586
springcloud
springcloud
master

搜索帮助