在Grails 3.1.4中,有一种方法可以将外部yml文件作为输入流加载为
S3Service s3Service = new RestS3Service(awsCredentials)
S3Object downloadedObject= S3Service.getObject("bucketName","application.yml")
Resource resourceConfig = new InputStreamResource(downloadedObject.getDataInputStream())
YamlPropertiesFactoryBean ypfb = new YamlPropertiesFactoryBean()
ypfb.setResources(resourceConfig)
ypfb.afterPropertiesSet()
我想在grails 2.5.1中做同样的事情,但无法弄清楚。我不想将文件下载到本地并设置 grails.config.location 的路径。