首页 > 移动平台 > 详细

application.yml使用@符合问题:'@' that cannot start any token. (Do not use @ for indentation)

时间:2018-10-12 19:52:48      阅读:1484      评论:0      收藏:0      [点我收藏+]

在application配置文件中使用@出现异常:

Exception in thread "main" while scanning for the next token
found character ‘@‘ that cannot start any token. (Do not use @ for indentation)
in ‘reader‘, line 4, column 11:
name: @project.artifactId@

 

代码:

info:
  app:
  name: @project.artifactId@
  encoding: @project.build.sourceEncoding@
  java:
    source: @java.version@
    target: @java.version@

解决方案,用单引号或双引号将@@之间的内容包起来:

info:
  app:
    name: "@project.artifactId@"
    encoding: ‘@project.build.sourceEncoding@‘
    java:
      source: ‘@java.version@‘
      target: ‘@java.version@‘

application.yml使用@符合问题:'@' that cannot start any token. (Do not use @ for indentation)

原文:https://www.cnblogs.com/ifindu-san/p/9780270.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!