参考博客:SpringBoot中,logback.xml里面读取yml里面的参数方式SpringBoot的yml文件修改#自定义配置参数ruoyi_custom: #通过yml配置变量设置日志文件输出path路径地址 log: path: C:/Users/14751/Documents/Test/ruoyi/logslogback.xml配置修改<!-- 获取yml中的log地址 --><springProperty scope="context" name="log.path" source="ruoyi_custom.log.path" defaultValue="/home/ruoyi/logs/"/>