Commit 0b1a91de authored by 张永's avatar 张永

log4j

parent 86669446
......@@ -236,6 +236,12 @@ public class HttpsUtil {
}
}
}
public static String doPost(String url) {
String result = HttpUtil.post(url);
return result;
}
/**
* 发送有参数的POST请求,参数为json格式
*/
......
......@@ -18,6 +18,8 @@ import java.util.Map;
import javax.sql.DataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.CallableStatementCallback;
import org.springframework.jdbc.core.CallableStatementCreator;
......@@ -37,7 +39,8 @@ import com.egolm.common.jdbc.exception.MustBeOneRowException;
import com.egolm.common.jdbc.exception.QueryArgsException;
public class JdbcTemplate extends org.springframework.jdbc.core.JdbcTemplate {
Logger logger_ = LoggerFactory.getLogger(JdbcTemplate.class);
protected Dialect dialect;
protected int sql_level = 2;
......@@ -692,9 +695,10 @@ public class JdbcTemplate extends org.springframework.jdbc.core.JdbcTemplate {
protected void showSql(String sql, Object[] args) {
if (sql_level == 1) {
logger.debug(sql);
logger_.debug(sql);
System.out.println(sql);
} else if (sql_level > 1) {
logger.debug(sql + " " + GsonUtil.toJson(args));
logger_.debug(sql + " " + GsonUtil.toJson(args));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment