2025-12-29 16:06:48 +08:00
|
|
|
package com.senmesh.common.exception.controller;
|
2025-06-11 09:42:13 +08:00
|
|
|
|
2025-12-29 16:06:48 +08:00
|
|
|
import com.senmesh.common.exception.dao.ExceptionLogMapper;
|
2025-06-11 09:42:13 +08:00
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 异常日志查看
|
|
|
|
|
*
|
|
|
|
|
* @author on 2019-11-05
|
|
|
|
|
*/
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/anon/exception")
|
|
|
|
|
@Api(tags = "异常日志查看")
|
|
|
|
|
public class ExceptionLogController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExceptionLogMapper exceptionLogMapper;
|
|
|
|
|
|
|
|
|
|
@GetMapping("/{id}")
|
|
|
|
|
public String getExceptionMsg(@PathVariable Long id) {
|
|
|
|
|
try {
|
|
|
|
|
return exceptionLogMapper.selectById(id).getMsg();
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return "未找到对应id错误";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|