由于Grails3/4使用的spring boot,spring boot自带shutdown机制,在application.yml配置中添加如下配置:
endpoints:
shutdown:
# 启用shutdown
enabled: true
# 禁用密码验证
sensitive: false
这里需要注意,请求类型必须是post方式
curl -X POST host:port/shutdown
由于Grails3/4使用的spring boot,spring boot自带shutdown机制,在application.yml配置中添加如下配置:
endpoints:
shutdown:
# 启用shutdown
enabled: true
# 禁用密码验证
sensitive: false
这里需要注意,请求类型必须是post方式
curl -X POST host:port/shutdown