問題:能讀取資源路徑下的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=
