Spring Boot while scanning for the next tokenfound character ‘@‘ that cannot start any token问题解决

  • Post author:
  • Post category:其他


问题描述:

Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token

found character ‘@’ that cannot start any token. (Do not use @ for indentation) in ‘reader’, line 91, column 19: password: @123

问题分析:

1、password参数值以@开头导致报错。

        url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        username: root
        password: @123

解决办法:

password参数值添加单引号。

        url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        username: root
        password: '@123'



版权声明:本文为qq_38974638原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。