package com.microservices.system.controller;

import com.microservices.common.core.web.domain.AjaxResult;
import com.microservices.common.security.annotation.RequiresPermissions;
import com.microservices.system.domain.Server;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务器监控
 *
 * @author microservices
 */
@RestController
@RequestMapping("/server")
public class ServerController {
    @RequiresPermissions("@ss.hasPermi('monitor:server:list')")
    @GetMapping()
    public AjaxResult getInfo() throws Exception {
        Server server = new Server();
        server.copyTo();
        return AjaxResult.success(server);
    }
}
