如何使用Spring从HDFS读取属性文件?

时间:2018-06-13 05:54:54

标签: spring apache-spark spring-boot hadoop hdfs

截至目前我的maven项目的资源文件夹中提供的属性文件,但我想将此文件移动到HDFS。目前,我在做如下。

@Configuration
@PropertySource(value = Array("classpath:app.properties"),ignoreResourceNotFound=false)
class AppConfig {  
    @Bean
    def propertyConfig = new PropertySourcesPlaceholderConfigurer()
}

我应该怎么做才能从hdfs://tmp/prop/app.properties读取app.properteis?

注意:我在这个项目中使用spark和scala进行编码。

0 个答案:

没有答案