Maven多环境下 active: @profileActive@报错问题解决

 

错误信息

found character '@' that cannot start any token. (Do not use @ for indentation)
 in 'reader', line 4, column 13:
 active: @profileActive@ 

说@profileActive@这里出问题了

按照网上的解决思路,需要重新加载项目,然后重新编译就没事了。

我尝试了两次,发现还是有问题

解决方法

后来通过网上的另外一个方案解决了。

解决方案如下

在pom文件的build中添加resources,在里面引用profileActive来解决这个问题。