解決Intellij IDEA中項目不能識別yml配置文件


問題:能讀取資源路徑下的properties配置文件但是不能讀yml配置文件

因為無法讀取配置yml配置文件,所以不能配置bean,導致項目啟動報錯

解決方法:

在VM options中設置虛擬機加載配置文件的路徑;

-Dspring.config.location=
-Djava.util.logging.config.file=C:\Users\用戶\.IntelliJIdea2019.3\system\tomcat\jdong-parent\conf\logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Xmx2048m
-XX:MaxPermSize=2048m
-Drebel.spring_plugin=true
-Drebel.hibernate_plugin=true
-Dspring.config.location=


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM