Files
senmesh-zc/src/main/java/com/newyetai/common/exception/controller/ExceptionLogController.java

34 lines
933 B
Java
Raw Normal View History

2025-06-11 09:42:13 +08:00
package com.newyetai.common.exception.controller;
import com.newyetai.common.exception.dao.ExceptionLogMapper;
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错误";
}
}
}