package com.example.springboot.controller; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.example.springboot.common.Result; import com.example.springboot.entity.alarmmg; import com.example.springboot.mapper.AlarmMapper; import com.example.springboot.service.AlarmService; @RestController @RequestMapping("/alarm") public class AlarmController { @Autowired AlarmMapper alarmMapper; @Autowired AlarmService alarmService; @GetMapping("/load") public Result selectAll() { List storageCagelist = alarmMapper.selectAll(); Map map = new HashMap<>(); map.put("list", storageCagelist); return Result.success(map); } }