Skip to the content.

Home / cs-notes / Architecture / Components / Spring / Boot / Configurations / Read / PropertySource

db.username = username
@Component
@PropertySource("config/a.properties")
class A {
    @Value("db.username")
    private String username;
}