Spring Boot Inherit application.properties from dependency

Use PropertySource annotation and provide two sources for your app:

@PropertySources({
        @PropertySource("classpath:app-common.properties"),
        @PropertySource("classpath:app.properties")
    })

more details can be found there
https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html

Leave a Comment