本文介绍了如何让grails run-app默认使用https(没有-https命令行选项)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够运行

  grails run-app 

并且拥有它,默认情况下,使用ssl,就像我跑过一样

  grails run-app -https 

我想这个行为有几个原因。最重要的是,我希望Netbeans IDE grails集成默认启动https连接。但是,在命令行上运行时,我不必记住或输入https,因为我总是希望在我的开发环境中使用它。

解决方案 div>

当然,这可以在IDE中配置吗?

如果您使用的是Linux或Mac,定义别名

 别名run-app ='grails run-app -https'

所以你可以通过在命令行输入 run-app 来获得你想要的行为。你也可以通过创建一个文件 run-app.bat 来实现,它的内容是

  grails run-app -https 

并将该文件放在一个目录中PATH

I would like to be able to run

grails run-app

and have it, by default, use ssl as if I ran

grails run-app -https

I would like this behavior for a couple reasons. The most important is that I want the Netbeans IDE grails integration to start up the https connection by default. But also, running on the command line, I won't have to remember or type the https since I always want that in my development environment.

解决方案

Surely this can be configured within the IDE?

If you're using Linux or Mac, I would define an alias

alias run-app='grails run-app -https'

so you can get the behaviour you want simply by typing run-app on the command line. You could similarly achieve this on windows by creating a file run-app.bat whose contents are

grails run-app -https

and put this file in a directory that's on the PATH

这篇关于如何让grails run-app默认使用https(没有-https命令行选项)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 07:01