Amazon s3 如何从Grails2.5.1中的s3 bucket加载外部配置?

Amazon s3 如何从Grails2.5.1中的s3 bucket加载外部配置?,amazon-s3,grails-3.0,grails-2.5,s3-bucket,Amazon S3,Grails 3.0,Grails 2.5,S3 Bucket,在Grails3.1.4中,有一种方法可以将外部yml文件作为inputstream加载为 S3Service s3Service = new RestS3Service(awsCredentials) S3Object downloadedObject= S3Service.getObject("bucketName","application.yml") Resource resourceConfig = new InputStreamResource(downloadedObject

在Grails3.1.4中,有一种方法可以将外部yml文件作为inputstream加载为

 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()
我想在Grails2.5.1中也这样做,但我想不通。我不想将文件下载到本地并将路径设置为grails.config.location