1 首先要把properties文件放入到resources文件夹中 2 引起原因可能有多种,下图是我之前的代码 加了getclassloader()方法之后 我的问题就解决了。 希望可以帮助到大家!!!