I have a simple main app:
@Configuration
@EnableAutoConfiguration
@ComponentScan(basePackages = "dreamteam.eho")
@Import({EhoConfig.class})
public class MainApp implements CommandLineRunner, ApplicationContextAware {
With config:
@Configuration
@EnableConfigurationProperties({RootProperties.class})
public class EhoConfig {
}
And properties:
@ConfigurationProperties("root")
public class RootProperties {
private String name;
I try to load config:
--spring.config.location=file:///E:/.../eho-bot/props/ --spring.profiles.active=eho
Path is correct. But yml isn't loaded;
application-eho.yml file:
logging:
file: D:/java/projects/telegram-bots/eho.log
level:
dreamteam.eho: INFO
org.springframework: DEBUG
root:
name: EHO-BOT
App runs with args, but all props null. Logging properties not aplied; sout:
--spring.config.location=file:///E:.../eho-bot/props/
--spring.profiles.active=eho
--spring.output.ansi.enabled=always