Cómo cambiar el puerto de grails localhost?
Estoy usando grails 2.0.4. Y quiero usar port:8090 en lugar de 8080 para localhost. Así que necesita ayuda para cambiar el puerto a 8090 de forma permanente.
11 answers
Hay dos opciones:
- Cambie
grails.serverURL
enConfig.groovy
de"http://localhost:8080/${appName}"
a"http://localhost:8090/${appName}"
. - Inicie grails con
-Dgrails.server.port.http=8090
en la línea de comandos. Establezca la variable de entornoGRAILS_OPTS
en-Dgrails.server.port.http=8090
para que se aplique automáticamente.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-08-21 22:10:29
Agregue lo siguiente a BuildConfig.groovy
:
grails.server.port.http = 8090
Véase http://forum.springsource.org/archive/index.php/t-97024.html para más detalles.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-05-03 12:27:34
Si está utilizando Netbeans IDE, establezca lo siguiente:
Config: -> BuildConfig.groovy: - > grails.servidor.portuario.http = 8090 y reinicie el servidor.
Sin IDE, escriba en el símbolo del sistema -:
grails -Dserver.port 8090 run-app
O
grails -Dserver.port=8090 run-app
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-01-08 09:35:24
Para griales 3 puede poner esto en su solicitud.yml
server:
port: 9999
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-06-30 23:18:40
Si está utilizando IntelliJ IDE entonces
Desde el menú de la aplicación, haga clic en Ejecutar >> Editar configuraciones... > > Opciones de VM: - Dgrails.servidor.portuario.http = 8180
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-01-07 21:20:54
Grails run-app-Dserver.puerto = 8090
O utilice otro número de puerto
En Intellij: Ctrl + Alt + G (teclado genérico); Cmd + Alt + G (teclado Mac) y utilizar solamente:
Run-app-Dserver.puerto = 8090
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-08-25 22:27:14
Línea de comandos: grails run-app -port 8090
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-05-18 01:14:05
Ejecute el comando (Ctrl + Alt + g)
- Hasta grails versión 2.x:
run-app -Dserver.port=8090
- Para grails versión 3.x:
run-app --port=8090
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-12-21 06:07:47
No dijiste qué IDE estás usando. Si está utilizando Netbeans, simplemente haga clic con el botón derecho en el nombre del proyecto y elija Propiedades. Desde la categoría Configuración General, puede cambiar fácilmente el puerto del servidor a lo que desee.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-06-11 20:57:04
Puede ejecutar la aplicación grails utilizando el siguiente comando en el terminal. el puerto de ejecución predeterminado es 8080.
Grails run-app-Dserver.puerto = 9090
Esto ejecutará la aplicación en el puerto 9090.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-03-27 04:47:32
Escriba lo siguiente en la línea de comandos:
grails -Dserver.port=8090 run-app
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-08-04 05:39:01