配置 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的全局配置文件 ...
随机推荐
- guppy
1.下载 wget https://mirror.oxfordnanoportal.com/software/analysis/ont-guppy-cpu_3.4.1_linux64.tar.gz
- 记录错误or日记(更新中)
前言: 从2018.8-17开始记录 本篇随笔记录做题时的小错误(大多数),考试总结(懒得总结了),做过的每个题的错误 2019.12.7 傻逼学校,给我三个小时假期给你们做题挣工资 2019.11. ...
- Codeforces Round #596 (Div. 2, based on Technocup 2020 Elimination Round 2) E. Rock Is Push dp
E. Rock Is Push You are at the top left cell (1,1) of an n×m labyrinth. Your goal is to get to the b ...
- MySQL实战45讲学习笔记:第三十四讲
一.本节概述 在实际生产中,关于 join 语句使用的问题,一般会集中在以下两类: 1. 我们 DBA 不让使用 join,使用 join 有什么问题呢?2. 如果有两个大小不同的表做 join,应该 ...
- JVM调优YoungGC
先上代码: 主函数: public class GCDemo { public static void main(String[] args) throws InterruptedEx ...
- spring tomcat启动 请求处理
onRefresh(); protected void onRefresh() { try { createEmbeddedServletContainer(); } } private void c ...
- java截取字符串中的最后几个字符
Java中的String类提供了一个substring(int from, int to)方法用于截取字符串中位置为from到to-1位置的字符. 因为字符串的字符位置是从0开始的,而substrin ...
- mybaties报错:There is no getter for property named 'table' in 'class java.lang.String'
报错是由于xml里获取不到这个table参数 package com.xxx.mapper; import java.util.List; import org.apache.ibatis.annot ...
- Redis(七)分布式锁
前面学习了Redis的数据结构以及命令.Redis中的事务和Redis对Lua脚本的支持. 这一章就对Redis这些特性做一下实战性应用--基于Redis的分布式锁实现. Lock和Distribut ...
- IIS_CVE-2015-1635-HTTP.SYS远程执行代码漏洞复现
CVE-2015-1635-HTTP.SYS远程执行代码漏洞复现 一.漏洞描述 远程执行代码漏洞存在于 HTTP 协议堆栈 (HTTP.sys) 中,当 HTTP.sys 未正确分析经特殊设计的 HT ...