在idea的terminal执行 mvn clean compile,然后在启动
SpringBoot多环境配置的问题
yml的配置:
spring:
profiles:
active: @profile.name@
启动项目时报错:
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 5, column 13: active: @profile.name@
发现问题:
idea的jdk和系统环境变量的jdk不一致
解决:把idea的jdk更新为系统的jdk