public static Properties getProperties(){ String fileName = “/”; YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean(); try { //绝对路径 //(new FileSystemResource(fileName)); (new ClassPathResource(fileName)); }catch (Exception e){ } Properties properties = (); String = ("key"); }
相关文章
- springBoot 读取yml 配置文件的三种方式 (包含以及非component下)
- SpringBoot通过yml等配置文件动态生成多个Bean
- 使用SnakeYAML读取yaml配置文件
- python 读取 yaml 配置文件参数的方法
- Spring、SpringBoot工程 yaml配置文件映射到pojo对象
- 从Nacos配置中心读取YAML格式的配置文件内容的四种方式
- SpringBoot读取配置文件
- C#通过反射动态加载dll,读取module、类、方法、特性,并通过反射+简单工厂+配置文件 实现ioc
- springboot的配置文件如何配置可以实现多个yml相互读取
- SpringBoot 读取配置文件的4种方式