环境
IntelliJ中的一切正常。当我在项目根目录中执行“grails console”时,我得到以下内容
Error executing script Console: groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed, SimpleTemplateScript1.groovy: 2: illegal string body character after dollar sign;
solution: either escape a literal dollar sign "\$5" or bracket the value expression "${5}" @ line 2, column 10.
1 error
答案 0 :(得分:1)
想出来!在脚手架目录中,文件“Controller.groovy”以某种方式进入了那里。删除此文件解决了该问题。获得的经验 - 当看到模板解析错误时,请仔细查看模板目录。