All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pro.shuangxi.devTool.mybatis.ApiPreProcessor Maven / Gradle / Ivy

There is a newer version: 1.0.6
Show newest version
package pro.shuangxi.devTool.mybatis;

import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.ibatis.plugin.Invocation;
import pro.shuangxi.devTool.utils.ServletUtils;

/**
 * @author mengshx datetime 2024-08-19 10:47
 **/
public class ApiPreProcessor implements PreProcessor {

    @Override
    public void doProcess(List logs, Invocation invocation) {
        try {
            HttpServletRequest request = ServletUtils.getRequest();
            if(request==null) return;
            String uri = request.getRequestURI();
            logs.add("-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->");
            logs.add("触发mapper的api:"+request.getMethod()+" " + uri);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy