错误信息:
Description:
Binding to target [Bindable@29526c22 type = java.util.List<com.atguigu.boot.bean.Pet>, value = 'none', annotations = array<Annotation>[[empty]]] failed:
Property: test.data.key1[0].name
Value: name1
Origin: class path resource [application.yaml] - 48:15
Reason: The elements [test.data.key1[0].name,test.data.key1[0].weight,test.data.key1[1].name,test.data.key1[1].weight] were left unbound.
Property: test.data.key1[0].weight
Value: 1
Origin: class path resource [application.yaml] - 49:17
Reason: The elements [test.data.key1[0].name,test.data.key1[0].weight,test.data.key1[1].name,test.data.key1[1].weight] were left unbound.
Property: test.data.key1[1].name
Value: name2
Origin: class path resource [application.yaml] - 50:15
Reason: The elements [test.data.key1[0].name,test.data.key1[0].weight,test.data.key1[1].name,test.data.key1[1].weight] were left unbound.
Property: test.data.key1[1].weight
Value: 2
Origin: class path resource [application.yaml] - 51:17
Reason: The elements [test.data.key1[0].name,test.data.key1[0].weight,test.data.key1[1].name,test.data.key1[1].weight] were left unbound.
Action:
Update your application's configuration
解决方案: 检查自定义类型Pet是否有 get 和 set 方法。