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=

猜你喜欢

转载自www.cnblogs.com/Lambquan/p/12084287.html
今日推荐