更新时间:2022-04-06 10:03:01
检查property1是否属性在MyProperties类中使用@PostContruct设置。如果不是,您可以将其分配给另一个属性。
Check if property1 was set using a @PostContruct in your MyProperties class. If it wasn't you can assign it to another property.
@PostConstruct
public void init() {
if(property1==null) {
property1 = //whatever you want
}
}