java.lang.IllegalArgumentException: Invalid 'log4jConfigLocation' parameter: class path resource [log4j.properties] cannot be resolved to URL because it does not exist
項目配置了 Log4j 配置文件路徑,但構建路徑中**未包含該配置文件所在的源文件夾**,導致類路徑下找不到 log4j.properties。

log4j.properties 的源文件夾(如 src/main/resources 或 src)
Source 頁籤定義的文件夾會被編譯輸出到 target/classes(或 bin),從而進入運行時類路徑。Spring 的 Log4jConfigListener 啟動時通過 classpath:log4j.properties 加載,找到文件即解決。
重新啟動項目,控制台不再報錯,Log4j 正常初始化輸出日志。
log4j.properties / log4j2.xml 放在 src/main/resources 目錄下。target/classes,無需手動配置 Build Path。