• 首页
  • 产品中心
    • 数式Oinone四大产品

      低代码开发平台无代码开发平台集成开发平台AI大模型开发
    • 数式Oinone体系能力

      用户与组织权限管理文件管理消息中心国际化业务审计
    • 数式Oinone核心产品特性

      低无一体面向软件公司场景无限制应用级扩容可分可合
  • 服务中心
    • 客户服务

      预约演示方案咨询私有部署找人定制
    • 开发者

      问答下载
    • Oinone学院

      社区学习

    《精讲面向软件公司的低代码平台——以Oinone为例》

  • 合作伙伴
    渠道申请伙伴名录专家库
  • 关于数式
0571-88757863

Operation and Maintenance Related:Does the Platform Have a Health Check Interface?


Ⅰ、Scenario Overview

To verify whether a service has started successfully, you can call the ********/ruok interface. Note that the port used for this interface call should be the actual running port of the server. When the interface returns "imok", it indicates that the service has started successfully; if it returns "no", the service failed to start.

Ⅱ、Code Logic

@Order(Ordered.LOWEST_PRECEDENCE)
@RestController
public class HealthCheckController implements ApplicationListener<ApplicationStartedEvent> {

    private static boolean IM_OK = false;

    private static final String SUCCESS_STRING = "imok";

    private static final String FAILURE_STRING = "no";

    @GetMapping("/ruok")
    public String ruok() {
        if (IM_OK) {
            return SUCCESS_STRING;
        }
        return FAILURE_STRING;
    }

    @Override
    public void onApplicationEvent(ApplicationStartedEvent event) {
        IM_OK = true;
    }

    public static boolean imok() {
        return IM_OK;
    }
}
Edit this page
Last Updated:1/15/26, 4:02 AM
Prev
Environment Migration:Dubbo Timeout Causes Import Failure When Importing Design Data
Next
Runtime:Dubbo Service Not Found
默认页脚
Copyright © 2026 Mr.Hope