解决Intellij IDEA中项目不能识别yml配置文件

问题:能读取资源路径下的properties配置文件但是不能读yml配置文件

因为无法读取配置yml配置文件,所以不能配置bean,导致项目启动报错

解决方法:

在VM options中设置虚拟机加载配置文件的路径;

-Dspring.config.location=
-Djava.util.logging.config.file=C:Users用户.IntelliJIdea2019.3system	omcatjdong-parentconflogging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Xmx2048m
-XX:MaxPermSize=2048m
-Drebel.spring_plugin=true
-Drebel.hibernate_plugin=true
-Dspring.config.location=
原文地址:https://www.cnblogs.com/Lambquan/p/12084287.html