在配置文件中增加了下面的配置并不起作用。

logging.file=/xx/xx.log

是因为在 springboot 2.2 版本之后上面的采纳数已经被废弃,需要用下面新的参数:

logging.file.name