闲来无事用STS创建个springboot项目,写好了mybatis的映射xml以及application.properties配置文件,各种找不到,后来换了几个位置算是找到了,但打包之后运行还是有问题,今天终于找到问题原因,如图

右键(项目) ->  Build Path -> Configure Build Path

一、确保你的资源文件  main/resources 在这里,没有的话添上

eclipse 用STS 创建 springboot 找不到 xml 和 propertirs

二、看一下Excluded的设置,我的resources在这里,但是全被排除了,这里把Excluded:**移除

eclipse 用STS 创建 springboot 找不到 xml 和 propertirs

三、操作完上一步,效果如下,这样配置在main/resources里的资源就全部找到了

eclipse 用STS 创建 springboot 找不到 xml 和 propertirs

相关文章:

  • 2021-04-24
  • 2021-09-29
  • 2021-12-13
  • 2021-10-22
  • 2021-09-03
  • 2021-10-12
  • 2021-05-29
  • 2021-08-06
猜你喜欢
  • 2021-08-01
  • 2021-09-13
  • 2021-04-19
  • 2022-01-03
  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
相关资源
相似解决方案