SpringBoot系列之四全局配置
来源:互联网 发布:网络黑钱提现 编辑:程序博客网 时间:2024/05/16 11:55
一、在src/main/resources代码目录下,建立application.properties文件
二、可配置内容实例如下
#配置context pach , 访问地址就是http://ip:port/spring-boot-helloserver.context-path=/spring-boot-helloserver.port=8081#server.address= # bind to a specific NIC#server.session-timeout= # session timeout in seconds#the context path, defaults to '/'#server.context-path=/spring-boot#server.servlet-path= # the servlet path, defaults to '/'#server.tomcat.access-log-pattern= # log pattern of the access log#server.tomcat.access-log-enabled=false # is access logging enabled#server.tomcat.protocol-header=x-forwarded-proto # ssl forward headers#server.tomcat.remote-ip-header=x-forwarded-for#server.tomcat.basedir=/tmp # base dir (usually not needed, defaults to tmp)#server.tomcat.background-processor-delay=30; # in seconds#server.tomcat.max-threads = 0 # number of threads in protocol handler#server.tomcat.uri-encoding = UTF-8 # character encoding to use for URL decoding###########################################################datasource -- \u6307\u5b9amysql\u6570\u636e\u5e93\u8fde\u63a5\u4fe1\u606f.########################################################spring.datasource.url = jdbc:mysql://localhost:3306/testspring.datasource.username = rootspring.datasource.password = rootspring.datasource.driverClassName = com.mysql.jdbc.Driverspring.datasource.max-active=20spring.datasource.max-idle=8spring.datasource.min-idle=8spring.datasource.initial-size=10########################################################### Java Persistence Api -- Spring jpa\u7684\u914d\u7f6e\u4fe1\u606f.######################################################### Specify the DBMSspring.jpa.database = MYSQL# Show or not log for each sql queryspring.jpa.show-sql = true# Hibernate ddl auto (create, create-drop, update)spring.jpa.hibernate.ddl-auto = update# Naming strategy#[org.hibernate.cfg.ImprovedNamingStrategy #org.hibernate.cfg.DefaultNamingStrategy]spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy# stripped before adding them to the entity manager)spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
阅读全文
0 0
- SpringBoot系列之四全局配置
- springboot系列文章(四)——fastjson、定时任务、全局异常配置
- SpringBoot系列之三全局异常的捕获处理
- springboot之全局异常
- SpringBoot配置属性之NOSQL(四)
- springboot之全局异常捕获
- SpringBoot系列<五>全局异常处理
- springboot系列文章(四)-springboot使用fastjson
- SpringBoot配置属性系列
- springboot配置ContextPath(配置全局过滤URl)
- springboot系列之-logging
- springmvc-springboot配置全局异常跳转页
- SpringBoot基于@ControllerAdvice配置全局异常处理
- 【SpringBoot系列】二:SpringBoot配置详解
- springBoot学习之全局错误捕获
- ZooKeeper系列之四:ZooKeeper的配置
- ZooKeeper系列之四:ZooKeeper的配置
- ZooKeeper系列之四:ZooKeeper的配置
- arm开发板上arecord 录音出现噪声的解决方法
- git 提交代码到github中(4)
- 图
- [AVC(H.264)] x264 ratecontrol小记
- 性能测试初探---接口性能测试
- SpringBoot系列之四全局配置
- POJ 1849 Two 笔记
- 银行家算法C++实现
- 计算几何练习3
- 进一步理解!linux下bus,device,driver三者关系
- 组成原理模型机
- L1-003. 个位数统计
- 给Dragonboard 410c开发板接上触摸屏显示器
- 2017 ICPC-ACM全国邀请赛(陕西) 随笔