如: 通过classpath:spring-context.property这种方式去访问maven中resource资源文件下的文件,系统提示not exist
首先,去target目录中的classes目录下查看有没有spring-context.property这个文件,如果没有,可以尝试
右击项目-->properties-->java Build Path-->切换到Source选项卡
Add Folder-->将property对应的目录勾选上-->重新编译(clean)
再次查看classes中有没有property文件。
如果有,
就可以通过classpath:spring-context.property直接访问了
附加:如果eclipse 中target文件里面没有东西,可以尝试通过文件夹的方式去访问target目录