spring:
application:
name: web-test
thymeleaf:
cache: false
enabled: false
devtools:
restart:
enabled: true
在热部署的时候,读取yml文件出现while parsing a block mapping in 'reader'
或者 while scanning for the next token found character '\t(TAB)
以上两种都是因为写yml配置的时候,格式不对。
切记不要用Tab键去缩进,不同的ide用Tab键的结果可能不同,采取空格符号去缩进。
另外缩进的时候,记得每一层缩进两个字母,不要多或少,切记也别重名。
本文探讨了在Spring Boot项目中使用YML配置文件时常见的格式错误,如使用Tab键进行缩进导致的问题,以及如何正确地使用空格进行缩进以避免热部署时的解析错误。
2198

被折叠的 条评论
为什么被折叠?



