Spring Bood Read Resource 发表于 2018-12-18 | 分类于 Java , Spring Boot , Resource Usage12345// resources/keys/private.pem -> path=/keys/private.pemfun readResourceFile(path: String, charset: Charset = Charsets.UTF_8): String { val classResource = ClassPathResource(path) return classResource.file.readText(charset)}