| 123456789101112131415161718192021222324252627 |
- package com.uas.saas.admin.service;
- import com.uas.account.sso.integration.entity.UserAccount;
- import com.uas.saas.admin.entity.ExceptionLog;
- import com.uas.saas.admin.repository.ExceptionRepository;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.scheduling.annotation.Async;
- import org.springframework.stereotype.Service;
- import javax.servlet.http.HttpServletRequest;
- /**
- * @author yingp
- * @date 2018/4/19
- */
- @Service
- public class ExceptionService {
- @Autowired
- private ExceptionRepository exceptionRepository;
- @Async
- public void saveLog(HttpServletRequest req, Exception e, UserAccount account) {
- ExceptionLog log = new ExceptionLog(req, e, account);
- exceptionRepository.saveLog(log);
- }
- }
|