zoukankan      html  css  js  c++  java
  • spring 中常用的配置项

    1.spring 中常用的配置项

    application.properties

    #端口
    server.port=8081
    #调试模式
    debug=false
    #上下文
    #一般情况下,小项目通常都是在tomcat下部署多个webapp,通过上下文区分
    #在集群或者中大型项目中,通常我们一个tomcat对应一个webapp,然后通过不同的端口来进行区分(8080/8081)
    server.servlet.context-path=/myspringboot
    #UTF-8只包含了20000+个中文字符,对应生僻字显示不了
    spring.http.encoding.charset=UTF-8
    #开启thymeleaf缓存
    #注意这里有大坑,除了设置cache=false外,还要设置
    #file->setting->build->complier->Build Project Auto... 勾选
    spring.thymeleaf.cache=false
    #Spring MVC中对输入参数的格式化
    spring.mvc.date-format=yyyy-MM-dd
    #设置JSON 日期序列化输出格式,北京时间相对伦敦有8个小时时差所以使用GMT+8
    spring.jackson.time-zone=GMT+8
    spring.jackson.date-format=yyyy-MM-ddd HH:mm:ss SSS
    #日志输出的地址,SpringBoot默认并没有进行文件输出,只在控制台中进行了打印
    logging.file=d:/logs/msb.log
    #日志级别 debug->info->warn->error
    #默认情况下SpringBoot日志级别为info
    #如果设置了debug=true的时候,日志会自动降到debug
    #ROOT代表默认全局设置
    logging.level.ROOT=INFO
    #设置指定包的输出级别
    logging.level.org.springframework=ERROR
    logging.level.org.apache=ERROR

    .

    .

  • 相关阅读:
    poj 3669 Meteor Shower
    poj 3009 Curling 2.0
    poj 1979 Red and Black
    区间内素数的筛选
    九度oj 题目1347:孤岛连通工程
    poj 3723 Conscription
    poj 3255 Roadblocks
    Luogu P3975 [TJOI2015]弦论
    AT2165 Median Pyramid Hard 二分答案 脑洞题
    后缀自动机多图详解(代码实现)
  • 原文地址:https://www.cnblogs.com/crazycode2/p/10284531.html
Copyright © 2011-2022 走看看