Grails 3.3.1控制台提供404

时间:2017-12-19 11:15:46

标签: grails grails-plugin

我有一个使用角度配置文件的grails应用程序,并且我的build.gradle中安装了控制台

console "org.grails:grails-console"

我在开发模式下运行应用程序:

Grails application running at http://localhost:8080 in environment: development

转到http://localhost:8080/consolehttp://localhost:8080/static/console时,控制台无法显示。使用 Chrome控制台,我看到发生404错误:

Request URL:http://localhost:8080/static/console
Request Method:GET
Status Code:404 
Remote Address:[::1]:8080
Referrer Policy:no-referrer-when-downgrade

我没有可能干扰控制台的自定义拦截器,也没有使用Spring安全性或其他安全框架。

如何让Grails控制台在我的项目上运行?

1 个答案:

答案 0 :(得分:1)

要使用基于Web的控制台,您需要添加插件:

compile 'org.grails.plugins:grails-console:2.1.1'

grails-console GitHub sources and docs

你的依赖:

console "org.grails:grails-console"

适用于将在“grails console”命令

之后运行的基于Swing的控制台