学习YAML的时候遇到的问题
报错如下:
11:37:05.526 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
in 'reader', line 2, column 3:
pname: apple手机
^
expected <block end>, but found ','
in 'reader', line 12, column 31:
attributes:{'color': 'white', 'com-type': '5G supper'}
检查后发现是yml文件
attributes:{'color': 'white', 'com-type': '5G supper'}
冒号之后忘记空格了
attributes: {'color': 'white', 'com-type': '5G supper'}
修改之后就好了
总是忘记要空格 有的时候会显示提醒有的时候就注意不到 写一个以后提醒自己一下