配置 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的全局配置文件 ...
随机推荐
- 《LinuxTools》
https://zhuanlan.zhihu.com/p/37196870 Linux基础 Linux工具进阶 工具参考篇 1. gdb 调试利器 2. ldd 查看程序依赖库 3. lsof 一切皆 ...
- CF707D Persistent Bookcase
CF707D Persistent Bookcase 洛谷评测传送门 题目描述 Recently in school Alina has learned what are the persistent ...
- vue.config.json CopyWebpackPlugin 没有生效
本地生效,服务器不生效. 因为是jenkinis构建,没有留意到报错.后来发现错误:ENOENT: no such file or directory, rename 解决方法就是:删除package ...
- 2019 SDN上机第四次作业
2019 SDN上机第4次作业 1. 解压安装OpenDayLight控制器(本次实验统一使用Beryllium版本) 修改环境变量 2. 启动并安装插件 3. 用Python脚本搭建如下拓扑,连接O ...
- SLAM中的非线性优化
总结一下SLAM中关于非线性优化的知识. 先列出参考: http://jacoxu.com/jacobian%E7%9F%A9%E9%98%B5%E5%92%8Chessian%E7%9F%A9%E9 ...
- Python连载18-closure闭包解释及其注意点
一.闭包 1.定义:当一个函数在内部定义函数,并且内部的函数应用外部函数的参数或者局部变量,当内部函数被当做返回值的时候,相关参数和变量保存在返回的函数之中,这种结果,叫做闭包. 2.例子:连载17中 ...
- HttpUtility.HtmlDecode ,HttpUtility.HtmlEncode 与 Server.HtmlDecode ,Server.HtmlEncode 与 HttpServerUtility.HtmlDecode , HttpServerUtility.HtmlEncode
HtmlEncode: 将 Html 源文件中不允许出现的字符进行编码,通常是编码以下字符"<".">"."&" 等. ...
- 【linux】查看GPU使用率
nvidia-smi -l 1 每秒刷新一次
- 聊一下,前后分离后带来的跨域访问和cookie问题
在谈前后分离前,我们先看看什么是前后一体的.当我们用javaweb开发网站时,最终我们渲染的jsp或者springthymeleaf.我们的页面其实是WEB-INFO或者templates下.当用户请 ...
- [MFC]_在vs2019中使用MFC快速构建简单windows窗口程序
微软基础类库(英语: Classes,简称MFC)是微软公司提供的一个类库(class libraries),以C++类的形式封装了Windows API,并且包含一个应用程序框架,以减少应用程序开发 ...