4
求教, springboot 元数据自动提示,如何配置 map、list 类型(也能正确提示)
source link: https://www.v2ex.com/t/798211
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
例如: application.yml
person:
name: 张三
age: 20
friends:
1:
name: 李四
age: 18
2:
name: 王五
age: 22
Person.java
class Person {
String name;
int age;
Map<Integer, Person> friends;
}
配置文件中 person.friends.1.name
是没有提示信息的,如何设置使得 map 属性也能正确的出现提示信息,且 key 可以是任意值(已知枚举可以提示)的。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK