使用“.yml”文件縮進需要注意的問題


使用 springcloud 整合微服務的時候,使用了 .yml 文件,結果一直報

 

org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token
found character '\t(TAB)' that cannot start any token. (Do not use \t(TAB) for indentation)
  in 'reader', line 9, column 1:
            name : serveice-member
      ^

這種奇怪的錯誤,其實,原因是在yml文件中,不可以使用“tab”鍵來縮進!縮進要使用空格來縮進,這樣就正常了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM