Home / cs-notes / Architecture / Components / Spring / Boot / Configurations / Read / PropertySource
- config/a.properties
db.username = username
- @PropertySource + @Value
- @PropertySource + @ConfigurationProperties
@Component
@PropertySource("config/a.properties")
class A {
@Value("db.username")
private String username;
}
- @PropertySource not support yml