HealthController.java 516 Bytes
package com.iot.scheduler.controller;

import com.iot.scheduler.service.DevicePullService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HealthController {

    @Resource
    private DevicePullService devicePullService;

    @GetMapping("/health")
    public String health() {
        devicePullService.getEnergyInfo();
        return "IoT Scheduler is running...";
    }
}