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

闲来无事用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