@PropertySource只能标注在类上面 @PropertySource(value="classpath:/cat.properties") 使用:在自定义类的属性上面@Value(value="${weight}") 相关文章: 2021-11-20 2022-01-12 2022-12-23 2021-09-02 2022-12-23 2022-12-23 2021-12-17