Spring Boot 在 application.yml 文件中配置servlet-path报错
若用application.properties配置如下:
server.servlet-path = *.html,结果是可以的。
但是若改为yml文件配置如下:
server:
servlet-path: *.html
就报错,错误信息如下:
Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning an alias
in 'reader', line 2, column 17:
servlet-path: *.html
^
expected alphabetic or numeric character, but found .
in 'reader', line 2, column 18:
servlet-path: *.html
^