jchanghong.autoconfig.db.mybatis.ParameterHandlerPlugin.kt Maven / Gradle / Ivy
package jchanghong.autoconfig.db.mybatis;
import org.apache.ibatis.executor.parameter.ParameterHandler
import org.apache.ibatis.plugin.Interceptor
import org.apache.ibatis.plugin.Intercepts
import org.apache.ibatis.plugin.Invocation
import org.apache.ibatis.plugin.Signature
import java.sql.PreparedStatement
/**
\* Created with IntelliJ IDEA.
\* User: jiang
\* Date: 2020/1/5
\* Time: 14:59
\*/
//@Intercepts(
// value = [Signature(type = ParameterHandler::class, method = "getParameterObject", args = []),
// Signature(type = ParameterHandler::class, method = "setParameters", args = [PreparedStatement::class])
// ]
//)
//class ParameterHandlerPlugin : Interceptor {
// override fun intercept(invocation: Invocation): Any? {
// var proceed = invocation.proceed()
// return proceed
// }
//
//}
// Object getParameterObject();
//
// void setParameters(PreparedStatement ps)
// throws SQLException;