美文网首页
springboot

springboot

作者: 陈振强 | 来源:发表于2017-10-14 21:09 被阅读0次

<span id="integrate_with_mybatis">与mybatis集成</span>

参考链接

<span id="enable_tomcat_access_log">打开内嵌tomcat access日志</span>

参考链接

server.tomcat.accesslog.buffered=true # Buffer output such that it is only flushed periodically.
server.tomcat.accesslog.directory=logs # Directory in which log files are created. Can be relative to the tomcat base dir or absolute.
server.tomcat.accesslog.enabled=false # Enable access log.
server.tomcat.accesslog.file-date-format=.yyyy-MM-dd # Date format to place in log file name.
server.tomcat.accesslog.pattern=common # Format pattern for access logs.
server.tomcat.accesslog.prefix=access_log # Log file name prefix.
server.tomcat.accesslog.rename-on-rotate=false # Defer inclusion of the date stamp in the file name until rotate time.
server.tomcat.accesslog.request-attributes-enabled=false # Set request attributes for IP address, Hostname, protocol and port used for the request.
server.tomcat.accesslog.rotate=true # Enable access log rotation.
server.tomcat.accesslog.suffix=.log # Log file name suffix.

比较常用的有(省略了前缀server.tomcat.accesslog.):

  • enabled,取值true、false,需要accesslog时设置为true
  • directory,指定access文件的路径
  • pattern,定义日志的格式,后续详述
  • rotate,指定是否启用日志轮转。默认为true。这个参数决定是否需要切换切换日志文件,如果被设置为false,则日志文件不会切换,即所有文件打到同一个日志文件中,并且file-date-format参数也会被忽略

<span id="use_tomcat_servlet_filter_listner">使用tomcat Servlet、Filter、Listener</span>

参考链接

相关文章

网友评论

      本文标题:springboot

      本文链接:https://www.haomeiwen.com/subject/zxbfuxtx.html