| key: value;kv之间有空格 |
| 大小写敏感 |
| 使用缩进表示层级关系 |
| 缩进不允许使用tab,只允许空格 |
| 缩进的空格数不重要,只要相同层级的元素左对齐即可 |
| '#'表示注释 |
| 字符串无需加引号,如果要加,''与""表示字符串内容 会被 转义/不转义 |
- 字面量:单个的、不可再分的值。date、boolean、string、number、null
- 对象:键值对的集合。map、hash、set、object
| 行内写法: k: {k1:v1,k2:v2,k3:v3} |
| |
| k: |
| k1: v1 |
| k2: v2 |
| k3: v3 |
- 数组:一组按次序排列的值。array、list、queue
| 行内写法: k: [v1,v2,v3] |
| |
| k: |
| - v1 |
| - v2 |
| - v3 |
| @Data |
| public class Person { |
| |
| private String userName; |
| private Boolean boss; |
| private Date birth; |
| private Integer age; |
| private Pet pet; |
| private String[] interests; |
| private List<String> animal; |
| private Map<String, Object> score; |
| private Set<Double> salarys; |
| private Map<String, List<Pet>> allPets; |
| } |
| |
| @Data |
| public class Pet { |
| private String name; |
| private Double weight; |
| } |
| |
| person: |
| userName: zhangsan |
| boss: false |
| birth: 2019/12/12 20:12:33 |
| age: 18 |
| pet: |
| name: tomcat |
| weight: 23.4 |
| interests: [篮球,游泳] |
| animal: |
| - jerry |
| - mario |
| score: |
| english: |
| first: 30 |
| second: 40 |
| third: 50 |
| math: [131,140,148] |
| chinese: {first: 128,second: 136} |
| salarys: [3999,4999.98,5999.99] |
| allPets: |
| sick: |
| - {name: tom} |
| - {name: jerry,weight: 47} |
| health: [{name: mario,weight: 47}] |
| <dependency> |
| <groupId>org.springframework.boot</groupId> |
| <artifactId>spring-boot-configuration-processor</artifactId> |
| <optional>true</optional> |
| </dependency> |
| |
| # 建议在打包时将该依赖排除 |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.springframework.boot</groupId> |
| <artifactId>spring-boot-maven-plugin</artifactId> |
| <configuration> |
| <excludes> |
| <exclude> |
| <groupId>org.springframework.boot</groupId> |
| <artifactId>spring-boot-configuration-processor</artifactId> |
| </exclude> |
| </excludes> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!