yaml文件 Spring 自动注入有两个注解可以使用,一个是@Vaule 另一个是@ConfigurationProperties。
注意集合以及复杂类的配置注入只能使用@ConfigurationProperties方式!!!@Value 是无法注入的!!!
两种注释详细学习:https://blog.csdn.net/yu0_zhang0/article/details/83745056

yaml文件 Spring 自动注入有两个注解可以使用,一个是@Vaule 另一个是@ConfigurationProperties。
注意集合以及复杂类的配置注入只能使用@ConfigurationProperties方式!!!@Value 是无法注入的!!!
两种注释详细学习:https://blog.csdn.net/yu0_zhang0/article/details/83745056