We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
虽然YAML可以对字符串值不用引号,但是SpringBoot的YML解析器会把纯数字的字符串解析成数字后转成该数字的字符串,比如 application.yml 中的 password,如果给值 0123456,会按8进制解析成字符串 42798,如果是 0x123456 会按16进制解析为字符串 1193046,造成取得值与实际值不符。因此建议在YML文件字符串类型的都加上双引号,以免造成很难发觉的错误。
application.yml
password
0123456
42798
0x123456
1193046
The text was updated successfully, but these errors were encountered:
No branches or pull requests
虽然YAML可以对字符串值不用引号,但是SpringBoot的YML解析器会把纯数字的字符串解析成数字后转成该数字的字符串,比如
application.yml
中的password
,如果给值0123456
,会按8进制解析成字符串42798
,如果是0x123456
会按16进制解析为字符串1193046
,造成取得值与实际值不符。因此建议在YML文件字符串类型的都加上双引号,以免造成很难发觉的错误。The text was updated successfully, but these errors were encountered: