package com.ruoyi.projectdev; import java.util.Properties; import org.springframework.beans.factory.config.YamlPropertiesFactoryBean; import org.springframework.core.io.ClassPathResource; /** Loads the same committed settings as the application; never logs credentials. */ public final class ProfileConfiguration { private ProfileConfiguration() { } public static Properties load(String profile) { var yaml = new YamlPropertiesFactoryBean(); yaml.setResources(new ClassPathResource("application.yml"), new ClassPathResource("application-" + profile + ".yml")); return yaml.getObject(); } }