Przeglądaj źródła

don't log for getConnection

sunyj 8 lat temu
rodzic
commit
a420440cb0

+ 0 - 6
src/main/java/com/uas/report/service/impl/PrintServiceImpl.java

@@ -135,10 +135,7 @@ public class PrintServiceImpl implements PrintService {
 
 		Connection connection = null;
 		try {
-			logger.info("dataSource.getConnection..." + userName);
 			connection = dataSource.getConnection();
-			logger.info("dataSource.getConnection done..." + userName);
-
 			String jasperFilePath = maybeCompileJrxmlFile(jrxmlFilePath, false, otherParameters, connection);
 			if(StringUtils.isEmpty(jasperFilePath)){
 				throw new IllegalStateException("编译报表模板失败: " + jrxmlFilePath);
@@ -679,10 +676,7 @@ public class PrintServiceImpl implements PrintService {
 		String jrxmlFilePath = fileService.getJrxmlFilePath(masterOfJrxml, reportName);
 		Connection connection = null;
 		try {
-			logger.info("dataSource.getConnection..." + userName);
 			connection = dataSource.getConnection();
-			logger.info("dataSource.getConnection done..." + userName);
-
 			File jrxmlFile = new File(jrxmlFilePath);
 			// 报表模板不存在
 			if (!jrxmlFile.exists()) {

+ 8 - 12
src/main/java/com/uas/report/util/MasterManager.java

@@ -1,5 +1,13 @@
 package com.uas.report.util;
 
+import com.alibaba.druid.pool.DruidDataSource;
+import com.alibaba.fastjson.JSONObject;
+import com.uas.report.SpecialProperties;
+import com.uas.report.model.Master;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.sql.DataSource;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
@@ -10,16 +18,6 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
-import javax.sql.DataSource;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.alibaba.druid.pool.DruidDataSource;
-import com.alibaba.fastjson.JSONObject;
-import com.uas.report.SpecialProperties;
-import com.uas.report.model.Master;
-
 /**
  * 账套及其数据源管理
  * 
@@ -108,9 +106,7 @@ public class MasterManager {
 		PreparedStatement preparedStatement = null;
 		ResultSet resultSet = null;
 		try {
-			logger.info("mainMaster.getConnection..." + mainMaster.getUsername() + "," + userName);
 			connection = mainMaster.getConnection();
-			logger.info("mainMaster.getConnection done..." + mainMaster.getUsername() + "," + userName);
 			// 先检查是否存在MASTER表
 			String sql = "select count(*) from user_tables where table_name='MASTER'";
 			preparedStatement = connection.prepareStatement(sql);