首页 > 其他分享 >application.yml基础配置

application.yml基础配置

时间:2024-08-16 15:37:29浏览次数:6  
标签:false ## 配置 连接 application token mysql true yml

sa-token:
# token名称 (同时也是cookie名称)
token-name: token
# token有效期,单位s 默认30天, -1代表永不过期
#timeout: 43200
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
activity-timeout: 43200
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
is-concurrent: false
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
is-share: true
# token风格
token-style: uuid
# 是否输出操作日志
is-log: false
# jwt秘钥
jwt-secret-key: asdasdasifhueuiwyurfewbfjsdafjk
#关闭banner
is-print: false

##Mybatis Plus配置##
mybatis-plus:
mapper-locations: classpath*:/mappers/*Mapper.xml
configuration:
map-underscore-to-camel-case: true
cache-enabled: true
lazy-loading-enabled: true
multiple-result-sets-enabled: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
auto-mapping-behavior: FULL
global-config:
banner: false
db-config:
id-type: auto
table-underline: true
logic-delete-field: isDelete
logicDeleteValue: 1
logicNotDeleteValue: 0
enable-sql-runner: true
type-handlers-package: com.qizhikj.tool.admin.api.handler.typehandler

spring:
application:
name: qztool-admin
##Redis配置##
redis:
# Redis服务器地址
host: ${redis.host:192.168.3.42}
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码(默认为空)
password: ${redis.password:}
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池最大连接数
max-active: 200
# 连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# 连接池中的最大空闲连接
max-idle: 50
# 连接池中的最小空闲连接
min-idle: 10
##数据源配置##
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${mysql.host:192.168.3.42}:${mysql.port:3306}/htgl_1_5?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
username: ${mysql.username:root}
password: ${mysql.password:root}
druid:
initialSize: 10 #初始化连接数
maxActive: 30 #最大活跃数
maxWait: 10000 #从池中获取连接最大等待时间 ms
testWhileIdle: true #申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
timeBetweenEvictionRunsMillis: 60000 #检测间隔ms
minEvictableIdleTimeMillis: 300000 #一个连接在池中最小生存的时间ms
filters: stat,wall,logback
stat-view-servlet:
login-username: root
login-password: 123456
reset-enable: false
url-pattern: /druid/*
enabled: true
allow: #IP白名单
deny: #IP黑名单
web-stat-filter:
url-pattern: /* #过滤规则
exclusions: "*.js,*.jpg,*.gif,*.png,*.css,*.ico,/druid/*"
initialization-mode: always #每次都初始化sql脚本
schema: classpath:/db/htgl_1_5.sql #初始化sql脚本

##定时器配置##
quartz:
#持久化到数据库方式
job-store-type: jdbc
jdbc:
initialize-schema: always #
properties:
org:
quartz:
scheduler:
instanceName: ${spring.application.name}Scheduler
instanceId: AUTO
jobStore:
class: org.quartz.impl.jdbcjobstore.JobStoreTX
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
tablePrefix: qrtz_
isClustered: true
clusterCheckinInterval: 10000
useProperties: false
threadPool:
class: org.quartz.simpl.SimpleThreadPool
threadCount: 10
threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true
logging:
level:
com:
qizhikj:
tool:
admin:
naming: DEBUG
config: classpath:logback.xml

server:
port: 8086

qz:
file:
mapping-url: /api/file/**
bucket-name: C://tour//files/
access-key-id:
access-key-secret:
authorization:
public_key:

标签:false,##,配置,连接,application,token,mysql,true,yml
From: https://www.cnblogs.com/yzxsx/p/18362985

相关文章

  • Phpstorm环境配置与应用
    PhpStorm是一款由JetBrains开发的PHP专用的集成开发环境(IDE),它提供了强大的功能,包括代码编辑、调试、版本控制、单元测试等,适用于PHP开发者进行高效编程。以下是关于如何配置和应用PhpStorm的一些基本步骤:1.安装PhpStorm首先,你需要从JetBrains官方网站下载PhpS......
  • maven配置私有仓库和阿里仓库共存
    profiles标签添加 <profile> <id>test</id> <repositories> <repository> <id>private-nexus</id> <url>http://192.168.10.2:8081/repository/maven-public/</url> </repository> </r......
  • SpringBoot中通过8项配置优化提升Tomcat性能
    ❃博主首页:「码到三十五」,同名公众号:「码到三十五」,wx号:「liwu0213」☠博主专栏:<mysql高手><elasticsearch高手><源码解读><java核心><面试攻关>♝博主的话:搬的每块砖,皆为峰峦之基;公众号搜索「码到三十五」关注这个爱发技术干货的coder,......
  • 在Windows下安装配置Navicat
    文章目录一、下载Navicat下载NavicatPremium下载NavicatPremiumLite二、安装Navicat三、试用Navicat四、链接数据库一、下载NavicatNavicatPremium与NavicatPremiumLite二者的区别是PremiumLite可以免费使用,但是只保留了精简功能,而Premium可以使用所......
  • Google浏览器下载与命令行启动环境配置
    Google下载地址:https://www.google.cn/intl/zh-CN/chrome/cmd输入chrome显示chrome不是内部或外部命令【cmd启动命令】chrome.exe--start-maximized--remote-debugging-port=2929--user-data-dir="D:\google_cache\2929"如果提示显示chrome不是内部或外部命令就按照......
  • cuda环境配置剖析,不再傻傻分不清楚该怎么装环境
    深度学习的第一课,永远是配环境,而这涉及到了很多方面的零碎知识,对于新手来说是很头疼的。而CUDA,作为每个环境都绕不开的主题,在很多时候都会成为成功运行代码的阻碍。这里简单介绍了一下一些需要注意的概念,和如何用conda去配cuda,希望能够让大家配环境的时候能够稍微轻松点。Dri......
  • 云计算实训30——mysql主从复制同步、mysql5.7版本安装配置、python操作mysql数据库、
    一、mysql主从复制及同步1、mysql主从自动开机同步2、配置mysql5.7版本mysql-5.7.44-linux-glibc2.12-x86_64.tar启动服务、登录对数据库进行基本操作3、使用python操纵mysql数据库4、编辑python脚本自动化操纵mysql数据库二、mycat读写分离......
  • AUTOSAR&UDS 理论要点及isolar实战-3E服务讲解及配置实战
    1.诊断设备在线3E服务此服务用于告知电控单元测试工具仍在线。该服务需周期性发送,用于重置S3server计时器并维持当前激活的非默认诊断会话。服务请求报文格式:相应格式:支持的否定响应码:2.配置实战2.1DcmDsdServiceTables的配置 3E服务的需求如下:支持3E服务及其......
  • Spring Boot集成Spring Cloud Config实现配置中心
    SpringBoot集成SpringCloudConfig实现配置中心大家好,我是微赚淘客返利系统3.0的小编,是个冬天不穿秋裤,天冷也要风度的程序猿!随着微服务架构的流行,集中管理配置信息变得越来越重要。SpringCloudConfig提供了一个配置服务器,用于集中管理分布式系统中的配置信息。本文将介绍如......
  • pyinstall通过配置.spec文件引用资源文件
    pyinstall通过配置.spec文件引用资源文件pyinstall可以自动将所有依赖的.py文件连接起来编译成一个可执行exe文件,但是如果在程序中使用了外部资源,如图片,或者是其它的配置文件的时候。pyinstall直接编译生成的exe文件可能会找不到程序中引用的资源。这时候我们就需要进入.spec......