val absoPath = Thread.
currentThread().getContextClassLoader().getResource(“资源文件路径test resources root下”).getPath
var fileStream =
new FileInputStream(absoPath)
properties.load(fileStream)
注:必须在pom.xml配置文件中设置
<
resources
>
<
resource
>