mirror of https://gitee.com/stylefeng/roses
【log】整理log模块,修改记录日志appName为默认问题。获取日志列表改为GET请求
parent
55898c70fd
commit
6de9145036
|
@ -35,7 +35,9 @@ public class LogRecordFactory {
|
|||
// 设置appName
|
||||
String applicationName = null;
|
||||
try {
|
||||
applicationName = SpringUtil.getApplicationContext().getApplicationName();
|
||||
// 修改直接从上下文环境中获取spring.application.name
|
||||
// 解决获取applicationName为空问题
|
||||
applicationName = SpringUtil.getApplicationContext().getEnvironment().getProperty("spring.application.name");
|
||||
} catch (Exception e) {
|
||||
applicationName = LogConstants.LOG_DEFAULT_APP_NAME;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import cn.stylefeng.roses.kernel.log.api.LogManagerApi;
|
|||
import cn.stylefeng.roses.kernel.log.api.pojo.manage.LogManagerParam;
|
||||
import cn.stylefeng.roses.kernel.log.api.pojo.record.LogRecordDTO;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.PostResource;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
||||
|
@ -35,7 +36,7 @@ public class LogManagerController {
|
|||
* @author luojie
|
||||
* @date 2020/11/3 12:58
|
||||
*/
|
||||
@PostResource(name = "查询日志列表", path = "/logManager/list")
|
||||
@GetResource(name = "查询日志列表", path = "/logManager/list")
|
||||
public ResponseData list(@RequestBody LogManagerParam logManagerParam) {
|
||||
PageResult<LogRecordDTO> logRecordDtoPageResult = logManagerApi.queryLogListPage(logManagerParam);
|
||||
return new SuccessResponseData(logRecordDtoPageResult);
|
||||
|
|
Loading…
Reference in New Issue