问题:能读取资源路径下的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=

相关文章:

  • 2021-10-25
  • 2021-04-01
  • 2022-12-23
  • 2022-12-23
  • 2021-08-14
  • 2021-06-08
  • 2022-12-23
  • 2022-01-07
猜你喜欢
  • 2021-11-11
  • 2021-05-10
  • 2022-01-07
  • 2022-12-23
  • 2021-05-15
相关资源
相似解决方案