问题的产生
springBoot项目中使用了yml格式的配置文件,使用了yml的流式格式,跟properties很像,只是将=
换成了:
,注意冒号后面有空格
yml对象示例
# 对象
applet.weixinApplet: {accessTokenUrl: 'https://api.weixin.qq.com/cgi-bin/token',phoneNumberUrl: 'https://api.weixin.qq.com/wxa/business/getuserphonenumber',openIdUrl: 'https://api.weixin.qq.com/sns/jscode2session'}
# 列表
applet.apps: [{type: 'manager', code: 10210, name: 'aa', id: adf, secret: ofwe},{type: 'manager', code: 10212, name: 'aa', id: adf, secret: ofwe}]
产生原因
applet.apps: [{type:'manager', code: 10210, name: 'aa', id: adf, secret: ofwe},{type: 'manager', code: 10212, name: 'aa', id:adf, secret: ofwe}]
上面的配置中有点:
后面没有空格就导致了报上面的错误