配置 application.properties
# 数据库链接信息
mysql.driver=com.mysql.cj.jdbc.Driver
mysql.url=jdbc:mysql://localhost:3306/mydemo?characterEncoding=UTF-8&serverTimezone=GMT%2B8
mysql.username=root
mysql.password=123456
一些配置,偶尔有些配置都存放到这里,备用
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=HTML
spring.thymeleaf.servlet.content-type=text/html
spring.freemarker.checkTemplateLocation=false
spring.thymeleaf.cache=false spring.datasource.url = jdbc:mysql://localhost:3306/mydemo?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&serverTimezone=UTC
spring.datasource.username = root
spring.datasource.password = 123456 ##sjl123 数据库密码
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
spring.datasource.max-active=200 //指定连接池中最大的活跃连接数
spring.datasource.max-idle=100 //指定连接池中连接的最大的空闲连接数量
spring.datasource.min-idle=100 //指定必须保持连接的最小值
spring.datasource.initial-size=100 //指定启动连接池时,初始建立的连接数量 mybatis.mapperLocations=classpath*:mapper/*.xml
mybatis.typeAliasesPackage=com.gugr.springboot.entity # sql for validating
spring.datasource.validationQuery=SELECT 1
# this will validate idle connection.if validation failed, will remove from pool
spring.datasource.testWhileIdle=true
spring.datasource.testOnBorrow=false
spring.datasource.testOnReturn=false
# max wait time
spring.datasource.maxWait=60000
spring.datasource.timeBetweenEvictionRunsMillis=30000 server.port=8080 # 日志配置
debug: true # 日志配置
logging.file=D:/mylog.log book.name=SpringCloudInAction
book.author=ZhaiYongChao
book.desc=${book.author} is writing《${book.name}》
eureka.instance.hostname=localhost
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:${server.port}/eureka/
配置 application.properties的更多相关文章
- Spring boot 的 properties 属性值配置 application.properties 与 自定义properties
配置属性值application.properties 文件直接配置: com.ieen.super.name="MDD" 自定义properties文件配置:src/main/r ...
- springboot 配置 application.properties相关
springboot 有读取外部配置文件的方法,如下优先级: 第一种是在jar包的同一目录下建一个config文件夹,然后把配置文件放到这个文件夹下.第二种是直接把配置文件放到jar包的同级目录.第三 ...
- springboot集成freemarker 配置application.properties详解
#配置freemarker详解 #spring.freemarker.allow-request-override=false # Set whether HttpServletRequest att ...
- Spring系列之——springboot解析resources.application.properties文件
摘要:本文通过讲解如何解析application.properties属性,介绍了几个注解的运用@Value @ConfigurationProperties @EnableConfiguration ...
- application.properties文件中暗藏玄机
上次分享了如何一步一步搭建一个springboot的项目,详细参见<5分钟快速搭建一个springboot的项目>,最终的结果是在"8080"端口搭建起了服务,并成功访 ...
- Spring boot 的application.properties 全局配置
端口号.项目名称 application.properties: server.port=8888 server.context-path=/start 日志相关的配置 # 自定义日志配置路径 log ...
- application.properties多环境配置文件、jar包外部配置文件、配置项加密、程序中配置使用
一.简介 spring boot项目application.properties文件存放及使用介绍 二.方法一多环境配置文件 我们一般都会有多个应用环境,开发环境.测试环境.生产环境,各个环境的配置会 ...
- Spring 的application.properties项目配置与注解
一.项目结构介绍 如上图所示,Spring Boot的基础结构共三个文件: src/main/java 程序开发以及主程序入口 src/main/resources 配置文件 src/test/ja ...
- springboot中配置文件application.properties的配置详情,数据源配置
pring Boot使用了一个全局的配置文件application.properties,放在src/main/resources目录下或者类路径的/config下.Sping Boot的全局配置文件 ...
随机推荐
- 用Python写Verilog(非HLS)
https://blog.csdn.net/qq_32010099/article/details/81197171 前段时间玩Python的时候好奇, 既然Python这么强大, 那么能不能用Pyt ...
- luoguP1791 [国家集训队]人员雇佣
题意 考虑先将所有价值加上,之后用最小割求最小代价. 考虑每个点对\((i,j)\),我们这样建边: 1.源点向每个点i连\(\sum\limits E_{i,j}\)容量的边. 2.每个点向汇点连雇 ...
- linux 安装盘作为 repo
1) CentOS 7.7 安装完之后, /etc/yum.repos.d 下面有很多.repo. 其中有一个CentOS-Media.repo. 编辑文件把enabled 改成 1 . 然后把其他. ...
- windows远程工具RDO和RDC使用问题
一. Remote Desktop Organizer远程连接时报错 解决方法: 二. Remote Desktop Connection Manager远程电脑没有全屏,右边和下边有滚动条 解决方法 ...
- Docker 简单发布dotnet core项目 文本版
原文:https://www.cnblogs.com/chuankang/p/9474591.html docker发布dotnet core简单流程 照着步骤来基本没错 但是有几个要注意的地方: v ...
- ESP8266 LUA脚本语言开发: 外设篇-串口
https://nodemcu.readthedocs.io/en/master/modules/uart/ 串口发送数据 发送一个16进制到串口 uart.write(0, 0xaa) 注: 之所以 ...
- Manthan, Codefest 18 (rated, Div. 1 + Div. 2) F 单调栈 + 贡献 + 计数
https://codeforces.com/contest/1037/problem/F 题意 function z(array a, integer k): if length(a) < k ...
- Luogu P3577 [POI2014]TUR-Tourism
Luogu P3577 [POI2014]TUR-Tourism 题目链接 题目大意:给出一张\(n\)个点,\(m\)条边的无向图,保证任意两点之间没有点数超过\(10\)的简单路径.选择第\(i\ ...
- D3力布图绘制--基本方法
本文主要结合案例记录使用D3.js绘制力布图的基本方法 样例显示 基本配置 this.force = d3.layout .force() .size([this.width, this.height ...
- elementui树表修改子节点不能实时更新的解决办法
在使用ElementUI提供的树表(el-table)的时候发现,如果手动通过JS修改了某个节点的children中的一条记录(子节点)的话,并不会自动刷新. 简单分析了一下,原因大概是因为VUE的数 ...