Caused by: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[sys-user] - 'File' option has the same value "/ruoyilog/sys-user.log" as that given for appender [file_info] defined earlier.
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[sys-user] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[sys-user] - For more information, please visit http://logback.qos.ch/codes.html#earlier_fa_collision
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.reinitialize(LogbackLoggingSystem.java:232)解决办法打开Logback配置文件:找到您的项目中Logback的配置文件,它可能是logback.xml、logback-spring.xml或类似的文件。
定位Appender配置:在Logback配置文件中,查找所有RollingFileAppender的定义,并找到file_info和sys-user两个Appender。
修改冲突的Appender配置:更改其中一个Appender的标签或标签的值,以确保每个Appender都写入不同的文件。例如:
/ruoyilog/file-info.log /ruoyilog/sys-user.log 保存配置文件:保存您对Logback配置文件所做的更改。重新启动应用程序:重新启动您的Spring Boot应用程序,以使更改生效。