springboot中yml常用配置
server:
port: 8080
spring:
datasource: #数据源配置
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/zys_erp?useUnicode=true&characterEncoding=utf8&useSSL=true&serverTimezone=UTC
username: root
password: root
druid:
max-active: 10
min-idle: 5
max-wait: 5000
initial-size: 5
validation-query: select 1
stat-view-servlet:
enabled: true
# login-username: admin
# login-password: admin
# allow:
# deny:
url-pattern: "/druid/*"
web-stat-filter:
enabled: true
url-pattern: "/druid/**"
exclusions: '*.js,*.gif,*.jpg,*.jpeg,*.png,*.css,*.ico,*.jsp,/druid/*'
principal-session-name: ''
session-stat-enable: true
session-stat-max-count: 1000
thymeleaf:
cache: false
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
#redis
redis:
host: www.leige.tech
password: 123456
port: 6390
jedis:
pool:
max-active: 20
max-idle: 8
min-idle: 0
max-wait: 2000 #shiro的配置
shiro:
hash-algorithm-name: md5
hash-iterations: 2
login-url: /index.html
unauthorized-url: /unauthorized.html
anon-urls:
- /api/login/doLogin*
- /api/druid/**
- /api/swagger-ui.html
- /api/webjars/**
- /api/swagger-resources/**
- /api/v2/**
- /api/login/captcha
- /api/login/checkLogin
logout-url: /api/login/logout*
authc-urls:
- /**
#mybatisplus的配置
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath:mapper/*/*Mapper.xml #fastdfs设置
fdfs:
so-timeout: 2500 # 读取时间
connect-timeout: 5000 # 连接超时时间
thumb-image: # 缩略图
width: 100
height: 100
tracker-list: # tracker服务配置地址列表
- www.leige.tech:22122
upload:
base-url: www.leige.tech/
allow-types:
- image/jpeg
- image/png
- image/bmp
springboot中yml常用配置的更多相关文章
- springboot中的常用注解
springboot中的常用注解个人觉得springboor中常用的注解主要可以分为三种:放入容器型注解.从容器中取出型注解和功能型注解.其中的放入容器型和从容器中取出型就是我们平时所说的控制反转和依 ...
- 详解Springboot中自定义SpringMVC配置
详解Springboot中自定义SpringMVC配置 WebMvcConfigurer接口 这个接口可以自定义拦截器,例如跨域设置.类型转化器等等.可以说此接口为开发者提前想到了很多拦截层面的需 ...
- springboot 中yml配置
springboot 中各种配置项纪录 1. @Value 最早获取配置文件中的配置的时候,使用的就是这个注解,SpEL表达式语言. // 使用起来很简单 @Value("${config. ...
- springBoot中实现自定义属性配置、实现异步调用、多环境配置
springBoot中其他相关: 1:springBoot中自定义参数: 1-1.自定义属性配置: 在application.properties中除了可以修改默认配置,我们还可以在这配置自定义的属性 ...
- MyBatis配置文件中的常用配置
一.连接数据库的配置单独放在一个properties文件中 之前,我们是直接将数据库的连接配置信息写在了MyBatis的conf.xml文件中,如下: <?xml version="1 ...
- SpringBoot(三) SpringBoot中的日志配置
SLF4J Spring Boot在所有内部日志中使用Commons Logging,但是默认配置也提供了对常用日志的支持,如:Java Util Logging,Log4J, Log4J2和Logb ...
- springboot中.yml没有spring的小叶子标志解决办法
我的idea springboot项目中有两个.yml文件,一个application.yml,一个log4j2.yml,但是只有application.yml显示的是树叶图标,如下所示 做如下配置后 ...
- 使用SpringBoot的yml文件配置时踩的一个坑
问题描述:使用SpringBoot整合redis进行yml配置的时候,启动工程报错,提示加载application.yml配置文件失败: ::27.430 [main] ERROR org.sprin ...
- springboot+mybatis +yml文件配置多数据源
记录一下java开发中多数据源的配置过程, 参考博客:https://blog.csdn.net/weinichendian/article/details/72903757,我在这里进行了整理,使用 ...
随机推荐
- 图论--网络流--最大流 洛谷P4722(hlpp)
题目描述 给定 nn 个点,mm 条有向边,给定每条边的容量,求从点 ss 到点 tt 的最大流. 输入格式 第一行包含四个正整数nn.mm.ss.tt,用空格分隔,分别表示点的个数.有向边的个数.源 ...
- 利用github的webhook进行自动部署
利用github的webhook进行自动部署 github提供了webhook功能,大概意思就是,当你提交了代码,git检测到你进行了push,可以调起你一个你知道的url. 这个功能有什么用了?比如 ...
- SpringCloud 踩坑之 注册中心绑定端口一直是8080
今天在启动注册中心服务时,突然端口一直是8080,找了好久一直没找到原因,先看看我有问题的配置 spring: application: name: eureka-server profiles: d ...
- iOS的内存管理和引用计数规则、Block的用法以及三种形式(stack、malloc、global)
学习内容 iOS的内存管理和引用计数规则 内存管理的思考方式 自己生成的对象自己持有 非自己生成的对象自己也能持有 自己持有的对象不需要时释放 非自己持有的对象不能释放 ARC有效时,id类型和对象类 ...
- search(11)- elastic4s-模糊查询
很多时候搜索用户对查询语句具有模糊感觉,他们只能提供大约的描述.比如一个语句的部分,或者字句顺序颠倒等.通过模糊查询可以帮助用户更准确的找出他们希望搜索的结果. 模糊查询包括前后缀,语句(phrase ...
- JDBC08时间处理
时间类型 java.util.Date 子类: -java.sql.Date无时分秒 -java.sql.Time -java.sql.Timestamp
- HDU 3874 Necklace 区间查询的离线操作
题目: http://acm.hdu.edu.cn/showproblem.php?pid=3874 对需要查询的区间按右端点排序,然后从左到右依次加入序列中的元素,同时更新,更新的方法是,把上一次出 ...
- ERROR 1552 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : 问题的解决
找到SpringbootApplication类, 在注释@SpringBootApplication后加上(exclude = {DataSourceAutoConfiguration.class} ...
- security安全框架,用户登录安全认证与退出
一.创建用户表及实体类 二.编写security配置文件 <?xml version="1.0" encoding="UTF-8"?><bea ...
- yield与park的区别
yield表示放弃本次cpu的时间片,但是操作系统在下一个时间片依旧可能会调用该线程/进程 park表示线程/进程睡眠,需要让其他线程/进程唤醒,才有可能重新被操作系统分配时间片, 非自旋锁,底层一般 ...