application.yml 中的 Grails 3 serverURL
Grails 3 serverURL in application.yml
我正尝试在 application.yml 中按如下方式设置每个环境的 serverURL:
environments:
development:
grails:
serverURL: http://localhost:8089
dataSource:
dbCreate: create
url: jdbc:postgresql://localhost:5432/tests
username: postgress
password: rootass
但它不起作用 - 当我 run-app
它仍然在 8080 上运行。另外,我如何设置应用程序名称或上下文名称所以当我 run-app
它就像 http://localhost:8089/vis
尝试以下操作:
server:
port: 8089
如果需要,您可以将 contextPath 添加到与端口相同的级别,例如
server:
port: 8089
contextPath: '/myApp'
访问
我正尝试在 application.yml 中按如下方式设置每个环境的 serverURL:
environments:
development:
grails:
serverURL: http://localhost:8089
dataSource:
dbCreate: create
url: jdbc:postgresql://localhost:5432/tests
username: postgress
password: rootass
但它不起作用 - 当我 run-app
它仍然在 8080 上运行。另外,我如何设置应用程序名称或上下文名称所以当我 run-app
它就像 http://localhost:8089/vis
尝试以下操作:
server:
port: 8089
如果需要,您可以将 contextPath 添加到与端口相同的级别,例如
server:
port: 8089
contextPath: '/myApp'
访问