你可以使用
@Value批注并在使用的任何Spring bean中访问属性
@Value("${userBucket.path}")private String userBucketPath;Spring Boot文档的Externalized Configuration部分介绍了你可能需要的所有详细信息。

你可以使用
@Value批注并在使用的任何Spring bean中访问属性
@Value("${userBucket.path}")private String userBucketPath;Spring Boot文档的Externalized Configuration部分介绍了你可能需要的所有详细信息。