class SofaBizHealthCheckEventHandler implements EventHandler<AfterBizStartupEvent> {

    private static final String READINESS_CHECK_LISTENER_CLASS = "com.alipay.sofa.boot.actuator.health.ReadinessCheckListener";

    private static boolean      isReadinessCheckListenerClassExist;

    static {
        try {
            Class.forName(READINESS_CHECK_LISTENER_CLASS);
            isReadinessCheckListenerClassExist = true;
        } catch (ClassNotFoundException e) {
            isReadinessCheckListenerClassExist = false;
        }

    }

    @Override
    public void handleEvent(AfterBizStartupEvent event) {
        doHealthCheck(event.getSource());
    }

    private void doHealthCheck(Biz biz) {<FILL_FUNCTION_BODY>}

    @Override
    public int getPriority() {
        return PriorityOrdered.DEFAULT_PRECEDENCE;
    }
}

        if (!isReadinessCheckListenerClassExist) {
            return;
        }

        ApplicationContext applicationContext = SofaRuntimeContainer.getApplicationContext(biz
            .getBizClassLoader());

        if (applicationContext == null) {
            throw new IllegalStateException("No application match classLoader");
        }

        ObjectProvider<ReadinessCheckListener> provider = applicationContext
            .getBeanProvider(ReadinessCheckListener.class);
        ReadinessCheckListener readinessCheckListener = provider.getIfUnique();

        if (readinessCheckListener != null) {
            if (!readinessCheckListener.aggregateReadinessHealth().getStatus().equals(Status.UP)) {
                throw new RuntimeException("Readiness health check failed.");
            }
        }
    
<no_super_class>