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 7, column 13:
active: @profileActive@
原因是我在项目中使用
spring:
jackson:
default-property-inclusion: non_null
profiles:
active: @profileActive@
@profileActive@ 可以使用 maven profile 进行选择不同配置文件进行开发、打包
为了解决上面的问题,我使用如下方法、 第一步:添加maven配置dev true dev test test pretest pretest prod prod
添加完上面的文件后,maven会出现图片的配置。
还是没解决问题,还需要引用pom依赖
org.yaml snakeyaml 1.17
添加依赖后,还需要添加一段配置
第三步:添加maven配置src/main/resources true
这样,问题就解决了,项目可以启动了。



