@Configuration
@PropertySource("classpath:application.properties")
@ComponentScan
public class StarterAppConfig {
}
我可以从添加注解明确直接的一个或多个属性添加多个属性?
像这样:
@Configuration
@Property("user", "myuser")
@Property("password", "mypassword")
@ComponentScan
public class StarterAppConfig {
}
感谢。
UPDATE
所以,我写my own annotation SingleProperty
和own processing for it。
我不知道如何做到这一点,但我可以问你为什么要这样做? –
看到我的更新,它指的是项目。总之,我想在子上下文的属性中指定'FXML'路径,但为了避免模板化。 – Dims