深入mybatis:Creating a new SqlSession到查询语句耗时长问题

转载自:https://guisu.blog.youkuaiyun.com/article/details/136236476?spm=1001.2014.3001.5502

一、背景

​ 最近在使用mybatis执行批量数据插入,数据插入非常慢:每批次5000条数据大概耗时在3~4分钟左右。

二、定位问题

定位问题的基本思路:
1、日志,排查问题的第一手资料。

2、初步定位问题的方向。

3、排查问题的基本思路。

1、全面打印日志:
logback设置mybatis相关日志打印:

<logger name="org.mybatis.spring" level="DEBUG"/>
<logger name="org.apache.ibatis" level="DEBUG"/>
<!--    <logger name="java.sql.PreparedStatement" level="DEBUG"/>-->
<!--    <logger name="java.sql.Statement" level="DEBUG"/>-->
<!--    <logger name="java.sql.Connection" level="DEBUG"/>-->
<!--    <logger name="java.sql.ResultSet" level="DEBUG"/>-->

2、日志初步定位问题
发现Creating a new SqlSession到查询语句耗时特别长:5000条sql耗时192秒左右。

img

3、初步排查问题的基本思路:
有几个可能的原因导致创建新的SqlSession到查询语句耗时特别长:

  1. 数据库连接池问题:如果连接池中没有空余的连接,则创建新的SqlSession时需要等待连接释放。可以通过增加连接池大小或者优化查询语句等方式来缓解该问题。

排除连接池问题:MySQL最大连接数的默认值是100, 这个数值对于并发连接很多的数据库的应用是远不够用的,当连接请求大于默认连接数后,就会出现无法连接数据库的错误,应用程序就会报:“Can not connect to MySQL server. Too many connections”-mysql 1040错误,这是因为访问MySQL且还未释放的连接数目已经达到MySQL的上限。

show variables like '%max_connections%';

img

  1. 网络延迟问题:如果数据库服务器和应用服务器之间的网络延迟较大,比跨地域连接,则创建新的SqlSession时会受到影响。可以通过优化网络配置或者将数据库服务器和应用服务器放在同一网络上等方式来解决问题。

排除网络问题:ping mysql地址,耗时都在0.5ms左右。

  1. 查询语句过于复杂:如果查询语句过于复杂,则会导致查询时间较长。可以通过优化查询语句或者增加索引等方式来缓解该问题。

排除复杂sql问题:简单insert 语句,通过mysql show processlist查看没有慢查询的连接。

<insert id="batchInsertDuplicate">
        INSERT INTO b_table_#{day} (
        <include refid="selectAllColumn"/>
        ) VALUES
        <foreach collection="list" item="item" index="index" separator=",">
            (
            #{item.id ,jdbcType=VARCHAR },
            #{item.sn ,jdbcType=VARCHAR },
            #{item.ip ,jdbcType=VARCHAR },
            .....
            #{item.createTime ,jdbcType=TIMESTAMP },
            #{item.updateTime ,jdbcType=TIMESTAMP }
            )
        </foreach>
        ON DUPLICATE KEY UPDATE
        `ip`=VALUES(`ip`),
        `updateTime`=VALUES(`updateTime`)
</insert>
  1. 数据库服务器性能问题:如果数据库服务器性能较低,则创建新的SqlSession时会受到影响。可以通过优化数据库服务器配置或者升级硬件等方式来缓解该问题。

排除数据库服务器性能问题:mysql是8核16G,登录mysql服务器top来看cpu和io占用使用率很低,同时通过mysql show processlist查看没有慢查询sql。

  1. 应用服务器性能问题:如果应用服务器性能较低,则创建新的SqlSession时会受到影响。可以通过优化应用服务器配置或者升级硬件等方式来缓解该问题。

暂时无法确定:top查看cpu占用比较高90%,可能原因是mybatis框架处理sql语句引起cpu飙高。

三、定位cpu飙高耗时的方法

1、优化代码:
5000条改为500条批量插入,耗时已经明显下降,耗时在2秒以内:

img

但查看每个线程的耗时依然很高,说明是mybatis框架处理sql语句耗cpu:

top -H -p 18912

img

2、使用arthas定位:
使用dashboard可以查看每个线程耗cpu情况,和top -H 差不多:

3、arthas trace方法耗时:

trace com.xxxx.class xxxmethod

img

img

最后定位方法GenericTokenParser:parse

img

img

查看 org.apache.ibatis.parsing.GenericTokenParser:parse的源码,分析性能原因:

public String parse(String text) {
        StringBuilder builder = new StringBuilder();
        if (text != null) {
            String after = text;
            int start = text.indexOf(this.openToken);
 
            for(int end = text.indexOf(this.closeToken); start > -1; end = after.indexOf(this.closeToken)) {
                String before;
                if (end <= start) {
                    if (end <= -1) {
                        break;
                    }
 
                    before = after.substring(0, end);
                    builder.append(before);
                    builder.append(this.closeToken);
                    after = after.substring(end + this.closeToken.length());
                } else {
                    before = after.substring(0, start);
                    String content = after.substring(start + this.openToken.length(), end);
                    String substitution;
                    if (start > 0 && text.charAt(start - 1) == '\\') {
                        before = before.substring(0, before.length() - 1);
                        substitution = this.openToken + content + this.closeToken;
                    } else {
                        substitution = this.handler.handleToken(content);
                    }
 
                    builder.append(before);
                    builder.append(substitution);
                    after = after.substring(end + this.closeToken.length());
                }
 
                start = after.indexOf(this.openToken);
            }
 
            builder.append(after);
        }
 
        return builder.toString();
    }

主要作用是对 SQL 进行解析,对转义字符进行特殊处理(删除反斜杠)并处理相关的参数(),如sql需要解析的标志{}),如sql需要解析的标志),sql需要解析的标志{name} 替换为实际的文本。我们可以使用一个例子说明:

final Map<String,Object> mapper = new HashMap<String, Object>();
mapper.put("name", "张三");
mapper.put("pwd", "123456");
	
//先初始化一个handler
TokenHandler  handler = new TokenHandler() {
	@Override
	public String handleToken(String content) {
	        System.out.println(content);
	        return (String) mapper.get(content);
	    }
	};
GenericTokenParser parser = new GenericTokenParser("${", "}", handler);
System.out.println("************" + parser.parse("用户:${name},你的密码是:${pwd}"));

4、分析耗时具体原因
通过源码发现,如果mapper定义的字段很多,for遍历条数比较大:

<insert id="batchInsertDuplicate">
        INSERT INTO b_table_#{day} (
        <include refid="selectAllColumn"/>
        ) VALUES
        <foreach collection="list" item="item" index="index" separator=",">
            (
            #{item.id ,jdbcType=VARCHAR },
            #{item.sn ,jdbcType=VARCHAR },
            #{item.ip ,jdbcType=VARCHAR },
            .....
            #{item.createTime ,jdbcType=TIMESTAMP },
            #{item.updateTime ,jdbcType=TIMESTAMP }
            )
        </foreach>
        ON DUPLICATE KEY UPDATE
        `ip`=VALUES(`ip`),
        `updateTime`=VALUES(`updateTime`)
</insert>

需要解析耗时较久,由于都是字符串遍历,批量插入行数(foreach行数)越多,字符越长,text.indexOf查找字符串越耗CPU性能越低,即标志${name} 替换为实际的文本的成本越高。因此可以看到当5000条记录降低到500条后(10倍数据量),时间从200秒左右降低到2秒(性能降低100倍),cpu依然很高的原因text.indexOf字符串查找一直持续在进行,持续消耗cpu。

四、解决

1、最好的解决方法:直接执行原声sql。
不使用mapper方式拼接sql,而是手动拼接好sql,使用JdbcTemplate执行原声sql。

2、具体代码实现:
service实现:

@Service
@Slf4j
public class PowerDayServiceImpl {
    @Autowired
    private PowerDayJdbcDao powerDayJdbcDao;
 
    /**
     * 批量新增活或修改
     *
     * @param machinePowerDayList
     */
     @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
    public Integer batchSaveOrUpdatePowerDay(List<MachinePowerDay> machinePowerDayList) {
        powerDayJdbcDao.batchSaveOrUpdate(machinePowerDayList);
    }
}

批量插入INSERT INTO … ON DUPLICATE KEY UPDATE是先判断如果没有,就插入记录否则就更新,在默认级别Repeatable read下,由于sql插入耗时很短且多线程并发插入很容易造成间隙锁。

INSERT INTO b_table(id,sn,ip…,createTime,updateTime) VALUES

(
#{item.id ,jdbcType=VARCHAR },
#{item.sn ,jdbcType=VARCHAR },
#{item.ip ,jdbcType=VARCHAR },

#{item.createTime ,jdbcType=TIMESTAMP },
#{item.updateTime ,jdbcType=TIMESTAMP }
)

ON DUPLICATE KEY UPDATE
ip=VALUES(ip),
updateTime=VALUES(updateTime)

因此在java的事务编程设置事务级别为Read commited类解决:

@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
public void batchSaveOrUpdate(List machinePowerDayList) {
//…
}

mysql锁相关和间隙锁详细说明:https://guisu.blog.youkuaiyun.com/article/details/7349562

dao实现:

@Repository("PowerDayJdbcDao")
@Slf4j
public class PowerDayJdbcDao {
    @Autowired
    private JdbcTemplate jdbcTemplate;
 
     /**
     * 批量新增活或修改
     *
     * @param machinePowerDayList
     */
    public Integer batchSaveOrUpdate(List<MachinePowerDay> machinePowerDayList) {
        final long begin = System.currentTimeMillis();
        int size = machinePowerDayList == null ? 0 : machinePowerDayList.size();
        log.info("batchSaveOrUpdate begin list size {}", size);
        Map<Long, List<MachinePowerDay>> listMap = machinePowerDayList.stream()
                .collect(Collectors.groupingBy(MachinePowerDay::getDay));
        for (Map.Entry<Long, List<MachinePowerDay>> entry : listMap.entrySet()) {
            List<MachinePowerDay> list = entry.getValue();
            Long day = entry.getKey();
            String sql = generateBatchInsertSql(day, list);
            jdbcTemplate.batchUpdate(sql);
        }
        long cost = System.currentTimeMillis() - begin;
        log.info("========== onlyBatchInsert end cost is {}", cost);
        return size;
    }
 
 
    /**
     * 组装MachinePowerDay 新增sql
     *
     * @param day
     * @param list
     * @return
     */
    public String generateBatchInsertSql(Long day, List<MachinePowerDay> list) {
 
        StringBuilder sb = new StringBuilder();
        for (MachinePowerDay machinePowerDay : list) {
            sb.append("(");
            sb.append("'").append(MybatisUtil.getUUID()).append("',");
            sb.append("'").append(trim(machinePowerDay.getSn())).append("',");
            sb.append("'").append(trim(machinePowerDay.getIp())).append("',");
            sb.append("'").append(trim(machinePowerDay.getPackageCode())).append("',");
            sb.append("'").append(trim(machinePowerDay.getRackCode())).append("',");
            sb.append("'").append(trim(machinePowerDay.getZoneCode())).append("',");
            sb.append("'").append(trim(machinePowerDay.getCabinetCode())).append("',");
            sb.append("'").append(machinePowerDay.getCoreCabinet()).append("',");
            sb.append(machinePowerDay.getTime()).append(",");
            sb.append(machinePowerDay.getDay()).append(",");
            sb.append(machinePowerDay.getPower()).append(",");
            sb.append("'").append(trim(machinePowerDay.getClusterId())).append("',");
            sb.append(machinePowerDay.getStoreClusterId()).append(",");
            sb.append("'").append(trim(machinePowerDay.getElectricLine())).append("',");
            sb.append("'").append(formatDate(machinePowerDay.getCreateTime())).append("',");
            sb.append("'").append(formatDate(machinePowerDay.getUpdateTime())).append("'");
            sb.append("),");
        }
        String valueStr = sb.toString();
        valueStr = valueStr.substring(0, valueStr.length() - 1);
 
        String sql = "INSERT INTO M_POWER_DAY_" + day
                + "(ID,SN,IP,PACKAGE_CODE,RACK_CODE,ZONE_CODE,CABINET_CODE,CORE_CABINET,"
                + "TIME,DAY,POWER,CLUSTER_ID,STORE_CLUSTER_ID,ELECTRIC_LINE,CREATE_TIME,UPDATE_TIME ) VALUES"
                + valueStr
                + "         ON DUPLICATE KEY UPDATE\n"
                + "        `IP`=VALUES(`IP`),\n"
                + "        `ZONE_CODE`=VALUES(`ZONE_CODE`),\n
                + "        `POWER`=VALUES(`POWER`),\n"
                + "        `CLUSTER_ID`=VALUES(`CLUSTER_ID`),\n"
                + "        `UPDATE_TIME`=VALUES(`UPDATE_TIME`)";
        return sql;
    }
   
    private String trim(String s) {
        return StringUtils.trimToEmpty(s);
    }
    private String formatDate(Date date) {
        return DateUtil.format(date, "yyyy-MM-dd HH:mm:ss");
    }
}

最后5000条批量插入耗时100ms以内:

img

300万数据,10个线程并发插入,1分钟内完成。

2025-10-22 22:31:38 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/] 2025-10-22 22:31:38 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /index.html 2025-10-22 22:31:38 DEBUG RequestMappingHandlerMapping:320 - Did not find handler method for [/index.html] 2025-10-22 22:31:38 DEBUG SimpleUrlHandlerMapping:190 - Matching patterns for request [/index.html] are [/**] 2025-10-22 22:31:38 DEBUG SimpleUrlHandlerMapping:219 - URI Template variables for request [/index.html] are {} 2025-10-22 22:31:38 DEBUG SimpleUrlHandlerMapping:140 - Mapping [/index.html] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/WEB-INF/views/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@2d8a68cc]]] and 1 interceptor 2025-10-22 22:31:38 DEBUG DispatcherServlet:951 - Last-Modified value for [/] is: -1 2025-10-22 22:31:38 DEBUG DispatcherServlet:1044 - Null ModelAndView returned to DispatcherServlet with name 'springMVC': assuming HandlerAdapter completed request handling 2025-10-22 22:31:38 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:31:55 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/user/list] 2025-10-22 22:31:55 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /user/list 2025-10-22 22:31:55 DEBUG RequestMappingHandlerMapping:317 - Returning handler method [public java.lang.String com.yourcompany.controller.UserController.getUserList(org.springframework.ui.Model)] 2025-10-22 22:31:55 DEBUG DefaultListableBeanFactory:251 - Returning cached instance of singleton bean 'userController' 2025-10-22 22:31:55 DEBUG DispatcherServlet:951 - Last-Modified value for [/user/list] is: -1 22:31:55.701 [http-nio-8080-exec-9] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession 22:31:55.707 [http-nio-8080-exec-9] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3b91154] was not registered for synchronization because synchronization is not active 2025-10-22 22:31:55 DEBUG DataSourceUtils:110 - Fetching JDBC Connection from DataSource 22:31:55.750 [http-nio-8080-exec-9] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hgeirabe3f6je32dl1po|4b58de13, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hgeirabe3f6je32dl1po|4b58de13, idleConnectionTestPeriod -> 300, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/as3?serverTimezone=UTC&seUnicode=true&characterEncoding=utf8&useSSL=false, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 20, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 5, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ] 22:31:55.766 [http-nio-8080-exec-9] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier '/mchange-commons.properties' could not be found. Skipping. 22:31:55.766 [http-nio-8080-exec-9] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier '/mchange-log.properties' could not be found. Skipping. 22:31:55.766 [http-nio-8080-exec-9] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier '/c3p0.properties' could not be found. Skipping. 22:31:55.766 [http-nio-8080-exec-9] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier 'hocon:/reference,/application,/c3p0,/' could not be found. Skipping. 22:31:55.766 [http-nio-8080-exec-9] WARN com.mchange.v2.resourcepool.BasicResourcePool - Bad pool size config, start 3 < min 5. Using 5 as start. 22:31:55.768 [http-nio-8080-exec-9] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - com.mchange.v2.resourcepool.BasicResourcePool@2541f640 config: [start -> 5; min -> 5; max -> 20; inc -> 3; num_acq_attempts -> 30; acq_attempt_delay -> 1000; check_idle_resources_delay -> 300000; max_resource_age -> 0; max_idle_time -> 0; excess_max_idle_time -> 0; destroy_unreturned_resc_time -> 0; expiration_enforcement_delay -> 0; break_on_acquisition_failure -> false; debug_store_checkout_exceptions -> false; force_synchronous_checkins -> false] 22:31:55.768 [http-nio-8080-exec-9] DEBUG com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager - Created new pool for auth, username (masked): 'ro******'. 22:31:55.768 [http-nio-8080-exec-9] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - acquire test -- pool size: 0; target_pool_size: 5; desired target? 1 22:31:55.768 [http-nio-8080-exec-9] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - awaitAvailable(): [unknown] 22:31:55.997 [http-nio-8080-exec-9] DEBUG org.mybatis.spring.transaction.SpringManagedTransaction - JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@f47a4d7 [wrapping: com.mysql.jdbc.JDBC4Connection@2121fc6a]] will not be managed by Spring 22:31:56.003 [http-nio-8080-exec-9] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Preparing: SELECT * FROM users 22:31:56.026 [http-nio-8080-exec-9] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Parameters: 22:31:56.050 [http-nio-8080-exec-9] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - <== Total: 1 22:31:56.054 [http-nio-8080-exec-9] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3b91154] 2025-10-22 22:31:56 DEBUG DataSourceUtils:327 - Returning JDBC Connection to DataSource [User{id=1, name='111', email=11111}]jgeydugwu 2025-10-22 22:31:56 DEBUG DefaultListableBeanFactory:1631 - Invoking afterPropertiesSet() on bean with name 'userList' 2025-10-22 22:31:56 DEBUG DispatcherServlet:1251 - Rendering view [org.springframework.web.servlet.view.JstlView: name 'userList'; URL [/userList.html]] in DispatcherServlet with name 'springMVC' 2025-10-22 22:31:56 DEBUG JstlView:432 - Added model object 'user' of type [java.util.ArrayList] to request in view with name 'userList' 2025-10-22 22:31:56 DEBUG JstlView:166 - Forwarding to resource [/userList.html] in InternalResourceView 'userList' 2025-10-22 22:31:56 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/userList.html] 2025-10-22 22:31:56 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /userList.html 2025-10-22 22:31:56 DEBUG RequestMappingHandlerMapping:320 - Did not find handler method for [/userList.html] 2025-10-22 22:31:56 DEBUG SimpleUrlHandlerMapping:190 - Matching patterns for request [/userList.html] are [/**] 2025-10-22 22:31:56 DEBUG SimpleUrlHandlerMapping:219 - URI Template variables for request [/userList.html] are {} 2025-10-22 22:31:56 DEBUG SimpleUrlHandlerMapping:140 - Mapping [/userList.html] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/WEB-INF/views/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@2d8a68cc]]] and 1 interceptor 2025-10-22 22:31:56 DEBUG DispatcherServlet:951 - Last-Modified value for [/userList.html] is: -1 2025-10-22 22:31:56 DEBUG DispatcherServlet:1044 - Null ModelAndView returned to DispatcherServlet with name 'springMVC': assuming HandlerAdapter completed request handling 2025-10-22 22:31:56 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:31:56 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:09 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/user/list] 2025-10-22 22:32:09 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /user/list 2025-10-22 22:32:09 DEBUG RequestMappingHandlerMapping:317 - Returning handler method [public java.lang.String com.yourcompany.controller.UserController.getUserList(org.springframework.ui.Model)] 2025-10-22 22:32:09 DEBUG DefaultListableBeanFactory:251 - Returning cached instance of singleton bean 'userController' 2025-10-22 22:32:09 DEBUG DispatcherServlet:951 - Last-Modified value for [/user/list] is: -1 22:32:09.397 [http-nio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession 22:32:09.397 [http-nio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1459739] was not registered for synchronization because synchronization is not active 2025-10-22 22:32:09 DEBUG DataSourceUtils:110 - Fetching JDBC Connection from DataSource 22:32:09.398 [http-nio-8080-exec-7] DEBUG org.mybatis.spring.transaction.SpringManagedTransaction - JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@bbdfc49 [wrapping: com.mysql.jdbc.JDBC4Connection@2121fc6a]] will not be managed by Spring 22:32:09.398 [http-nio-8080-exec-7] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Preparing: SELECT * FROM users 22:32:09.398 [http-nio-8080-exec-7] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Parameters: 22:32:09.399 [http-nio-8080-exec-7] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - <== Total: 1 22:32:09.399 [http-nio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1459739] 2025-10-22 22:32:09 DEBUG DataSourceUtils:327 - Returning JDBC Connection to DataSource [User{id=1, name='111', email=11111}]jgeydugwu 2025-10-22 22:32:09 DEBUG DispatcherServlet:1251 - Rendering view [org.springframework.web.servlet.view.JstlView: name 'userList'; URL [/userList.html]] in DispatcherServlet with name 'springMVC' 2025-10-22 22:32:09 DEBUG JstlView:432 - Added model object 'user' of type [java.util.ArrayList] to request in view with name 'userList' 2025-10-22 22:32:09 DEBUG JstlView:166 - Forwarding to resource [/userList.html] in InternalResourceView 'userList' 2025-10-22 22:32:09 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/userList.html] 2025-10-22 22:32:09 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /userList.html 2025-10-22 22:32:09 DEBUG RequestMappingHandlerMapping:320 - Did not find handler method for [/userList.html] 2025-10-22 22:32:09 DEBUG SimpleUrlHandlerMapping:190 - Matching patterns for request [/userList.html] are [/**] 2025-10-22 22:32:09 DEBUG SimpleUrlHandlerMapping:219 - URI Template variables for request [/userList.html] are {} 2025-10-22 22:32:09 DEBUG SimpleUrlHandlerMapping:140 - Mapping [/userList.html] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/WEB-INF/views/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@2d8a68cc]]] and 1 interceptor 2025-10-22 22:32:09 DEBUG DispatcherServlet:951 - Last-Modified value for [/userList.html] is: -1 2025-10-22 22:32:09 DEBUG DispatcherServlet:1044 - Null ModelAndView returned to DispatcherServlet with name 'springMVC': assuming HandlerAdapter completed request handling 2025-10-22 22:32:09 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:09 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:10 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/user/list] 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /user/list 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:317 - Returning handler method [public java.lang.String com.yourcompany.controller.UserController.getUserList(org.springframework.ui.Model)] 2025-10-22 22:32:10 DEBUG DefaultListableBeanFactory:251 - Returning cached instance of singleton bean 'userController' 2025-10-22 22:32:10 DEBUG DispatcherServlet:951 - Last-Modified value for [/user/list] is: -1 22:32:10.118 [http-nio-8080-exec-8] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession 22:32:10.119 [http-nio-8080-exec-8] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7cca23ef] was not registered for synchronization because synchronization is not active 2025-10-22 22:32:10 DEBUG DataSourceUtils:110 - Fetching JDBC Connection from DataSource 22:32:10.119 [http-nio-8080-exec-8] DEBUG org.mybatis.spring.transaction.SpringManagedTransaction - JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@7632489f [wrapping: com.mysql.jdbc.JDBC4Connection@2121fc6a]] will not be managed by Spring 22:32:10.119 [http-nio-8080-exec-8] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Preparing: SELECT * FROM users 22:32:10.119 [http-nio-8080-exec-8] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Parameters: 22:32:10.120 [http-nio-8080-exec-8] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - <== Total: 1 22:32:10.120 [http-nio-8080-exec-8] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7cca23ef] 2025-10-22 22:32:10 DEBUG DataSourceUtils:327 - Returning JDBC Connection to DataSource [User{id=1, name='111', email=11111}]jgeydugwu 2025-10-22 22:32:10 DEBUG DispatcherServlet:1251 - Rendering view [org.springframework.web.servlet.view.JstlView: name 'userList'; URL [/userList.html]] in DispatcherServlet with name 'springMVC' 2025-10-22 22:32:10 DEBUG JstlView:432 - Added model object 'user' of type [java.util.ArrayList] to request in view with name 'userList' 2025-10-22 22:32:10 DEBUG JstlView:166 - Forwarding to resource [/userList.html] in InternalResourceView 'userList' 2025-10-22 22:32:10 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/userList.html] 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /userList.html 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:320 - Did not find handler method for [/userList.html] 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:190 - Matching patterns for request [/userList.html] are [/**] 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:219 - URI Template variables for request [/userList.html] are {} 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:140 - Mapping [/userList.html] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/WEB-INF/views/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@2d8a68cc]]] and 1 interceptor 2025-10-22 22:32:10 DEBUG DispatcherServlet:951 - Last-Modified value for [/userList.html] is: -1 2025-10-22 22:32:10 DEBUG DispatcherServlet:1044 - Null ModelAndView returned to DispatcherServlet with name 'springMVC': assuming HandlerAdapter completed request handling 2025-10-22 22:32:10 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:10 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:10 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/user/list] 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /user/list 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:317 - Returning handler method [public java.lang.String com.yourcompany.controller.UserController.getUserList(org.springframework.ui.Model)] 2025-10-22 22:32:10 DEBUG DefaultListableBeanFactory:251 - Returning cached instance of singleton bean 'userController' 2025-10-22 22:32:10 DEBUG DispatcherServlet:951 - Last-Modified value for [/user/list] is: -1 22:32:10.320 [http-nio-8080-exec-10] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession 22:32:10.320 [http-nio-8080-exec-10] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@774dded2] was not registered for synchronization because synchronization is not active 2025-10-22 22:32:10 DEBUG DataSourceUtils:110 - Fetching JDBC Connection from DataSource 22:32:10.320 [http-nio-8080-exec-10] DEBUG org.mybatis.spring.transaction.SpringManagedTransaction - JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@7db5b5a2 [wrapping: com.mysql.jdbc.JDBC4Connection@2121fc6a]] will not be managed by Spring 22:32:10.320 [http-nio-8080-exec-10] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Preparing: SELECT * FROM users 22:32:10.321 [http-nio-8080-exec-10] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Parameters: 22:32:10.321 [http-nio-8080-exec-10] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - <== Total: 1 22:32:10.321 [http-nio-8080-exec-10] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@774dded2] 2025-10-22 22:32:10 DEBUG DataSourceUtils:327 - Returning JDBC Connection to DataSource [User{id=1, name='111', email=11111}]jgeydugwu 2025-10-22 22:32:10 DEBUG DispatcherServlet:1251 - Rendering view [org.springframework.web.servlet.view.JstlView: name 'userList'; URL [/userList.html]] in DispatcherServlet with name 'springMVC' 2025-10-22 22:32:10 DEBUG JstlView:432 - Added model object 'user' of type [java.util.ArrayList] to request in view with name 'userList' 2025-10-22 22:32:10 DEBUG JstlView:166 - Forwarding to resource [/userList.html] in InternalResourceView 'userList' 2025-10-22 22:32:10 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/userList.html] 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /userList.html 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:320 - Did not find handler method for [/userList.html] 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:190 - Matching patterns for request [/userList.html] are [/**] 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:219 - URI Template variables for request [/userList.html] are {} 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:140 - Mapping [/userList.html] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/WEB-INF/views/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@2d8a68cc]]] and 1 interceptor 2025-10-22 22:32:10 DEBUG DispatcherServlet:951 - Last-Modified value for [/userList.html] is: -1 2025-10-22 22:32:10 DEBUG DispatcherServlet:1044 - Null ModelAndView returned to DispatcherServlet with name 'springMVC': assuming HandlerAdapter completed request handling 2025-10-22 22:32:10 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:10 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:10 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/user/list] 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /user/list 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:317 - Returning handler method [public java.lang.String com.yourcompany.controller.UserController.getUserList(org.springframework.ui.Model)] 2025-10-22 22:32:10 DEBUG DefaultListableBeanFactory:251 - Returning cached instance of singleton bean 'userController' 2025-10-22 22:32:10 DEBUG DispatcherServlet:951 - Last-Modified value for [/user/list] is: -1 22:32:10.509 [http-nio-8080-exec-2] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession 22:32:10.509 [http-nio-8080-exec-2] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@69d48655] was not registered for synchronization because synchronization is not active 2025-10-22 22:32:10 DEBUG DataSourceUtils:110 - Fetching JDBC Connection from DataSource 22:32:10.509 [http-nio-8080-exec-2] DEBUG org.mybatis.spring.transaction.SpringManagedTransaction - JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@3ad758c4 [wrapping: com.mysql.jdbc.JDBC4Connection@2121fc6a]] will not be managed by Spring 22:32:10.509 [http-nio-8080-exec-2] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Preparing: SELECT * FROM users 22:32:10.509 [http-nio-8080-exec-2] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Parameters: 22:32:10.510 [http-nio-8080-exec-2] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - <== Total: 1 22:32:10.510 [http-nio-8080-exec-2] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@69d48655] 2025-10-22 22:32:10 DEBUG DataSourceUtils:327 - Returning JDBC Connection to DataSource [User{id=1, name='111', email=11111}]jgeydugwu 2025-10-22 22:32:10 DEBUG DispatcherServlet:1251 - Rendering view [org.springframework.web.servlet.view.JstlView: name 'userList'; URL [/userList.html]] in DispatcherServlet with name 'springMVC' 2025-10-22 22:32:10 DEBUG JstlView:432 - Added model object 'user' of type [java.util.ArrayList] to request in view with name 'userList' 2025-10-22 22:32:10 DEBUG JstlView:166 - Forwarding to resource [/userList.html] in InternalResourceView 'userList' 2025-10-22 22:32:10 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/userList.html] 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /userList.html 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:320 - Did not find handler method for [/userList.html] 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:190 - Matching patterns for request [/userList.html] are [/**] 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:219 - URI Template variables for request [/userList.html] are {} 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:140 - Mapping [/userList.html] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/WEB-INF/views/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@2d8a68cc]]] and 1 interceptor 2025-10-22 22:32:10 DEBUG DispatcherServlet:951 - Last-Modified value for [/userList.html] is: -1 2025-10-22 22:32:10 DEBUG DispatcherServlet:1044 - Null ModelAndView returned to DispatcherServlet with name 'springMVC': assuming HandlerAdapter completed request handling 2025-10-22 22:32:10 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:10 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:10 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/user/list] 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /user/list 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:317 - Returning handler method [public java.lang.String com.yourcompany.controller.UserController.getUserList(org.springframework.ui.Model)] 2025-10-22 22:32:10 DEBUG DefaultListableBeanFactory:251 - Returning cached instance of singleton bean 'userController' 2025-10-22 22:32:10 DEBUG DispatcherServlet:951 - Last-Modified value for [/user/list] is: -1 22:32:10.695 [http-nio-8080-exec-1] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession 22:32:10.695 [http-nio-8080-exec-1] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@440a7656] was not registered for synchronization because synchronization is not active 2025-10-22 22:32:10 DEBUG DataSourceUtils:110 - Fetching JDBC Connection from DataSource 22:32:10.695 [http-nio-8080-exec-1] DEBUG org.mybatis.spring.transaction.SpringManagedTransaction - JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@4ef21d26 [wrapping: com.mysql.jdbc.JDBC4Connection@2121fc6a]] will not be managed by Spring 22:32:10.695 [http-nio-8080-exec-1] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Preparing: SELECT * FROM users 22:32:10.695 [http-nio-8080-exec-1] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Parameters: 22:32:10.697 [http-nio-8080-exec-1] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - <== Total: 1 22:32:10.697 [http-nio-8080-exec-1] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@440a7656] 2025-10-22 22:32:10 DEBUG DataSourceUtils:327 - Returning JDBC Connection to DataSource [User{id=1, name='111', email=11111}]jgeydugwu 2025-10-22 22:32:10 DEBUG DispatcherServlet:1251 - Rendering view [org.springframework.web.servlet.view.JstlView: name 'userList'; URL [/userList.html]] in DispatcherServlet with name 'springMVC' 2025-10-22 22:32:10 DEBUG JstlView:432 - Added model object 'user' of type [java.util.ArrayList] to request in view with name 'userList' 2025-10-22 22:32:10 DEBUG JstlView:166 - Forwarding to resource [/userList.html] in InternalResourceView 'userList' 2025-10-22 22:32:10 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/userList.html] 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /userList.html 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:320 - Did not find handler method for [/userList.html] 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:190 - Matching patterns for request [/userList.html] are [/**] 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:219 - URI Template variables for request [/userList.html] are {} 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:140 - Mapping [/userList.html] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/WEB-INF/views/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@2d8a68cc]]] and 1 interceptor 2025-10-22 22:32:10 DEBUG DispatcherServlet:951 - Last-Modified value for [/userList.html] is: -1 2025-10-22 22:32:10 DEBUG DispatcherServlet:1044 - Null ModelAndView returned to DispatcherServlet with name 'springMVC': assuming HandlerAdapter completed request handling 2025-10-22 22:32:10 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:10 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:10 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/user/list] 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /user/list 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:317 - Returning handler method [public java.lang.String com.yourcompany.controller.UserController.getUserList(org.springframework.ui.Model)] 2025-10-22 22:32:10 DEBUG DefaultListableBeanFactory:251 - Returning cached instance of singleton bean 'userController' 2025-10-22 22:32:10 DEBUG DispatcherServlet:951 - Last-Modified value for [/user/list] is: -1 22:32:10.903 [http-nio-8080-exec-3] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession 22:32:10.903 [http-nio-8080-exec-3] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4f16f8e4] was not registered for synchronization because synchronization is not active 2025-10-22 22:32:10 DEBUG DataSourceUtils:110 - Fetching JDBC Connection from DataSource 22:32:10.903 [http-nio-8080-exec-3] DEBUG org.mybatis.spring.transaction.SpringManagedTransaction - JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@fa43cca [wrapping: com.mysql.jdbc.JDBC4Connection@2121fc6a]] will not be managed by Spring 22:32:10.903 [http-nio-8080-exec-3] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Preparing: SELECT * FROM users 22:32:10.904 [http-nio-8080-exec-3] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Parameters: 22:32:10.905 [http-nio-8080-exec-3] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - <== Total: 1 22:32:10.905 [http-nio-8080-exec-3] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4f16f8e4] 2025-10-22 22:32:10 DEBUG DataSourceUtils:327 - Returning JDBC Connection to DataSource [User{id=1, name='111', email=11111}]jgeydugwu 2025-10-22 22:32:10 DEBUG DispatcherServlet:1251 - Rendering view [org.springframework.web.servlet.view.JstlView: name 'userList'; URL [/userList.html]] in DispatcherServlet with name 'springMVC' 2025-10-22 22:32:10 DEBUG JstlView:432 - Added model object 'user' of type [java.util.ArrayList] to request in view with name 'userList' 2025-10-22 22:32:10 DEBUG JstlView:166 - Forwarding to resource [/userList.html] in InternalResourceView 'userList' 2025-10-22 22:32:10 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/userList.html] 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /userList.html 2025-10-22 22:32:10 DEBUG RequestMappingHandlerMapping:320 - Did not find handler method for [/userList.html] 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:190 - Matching patterns for request [/userList.html] are [/**] 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:219 - URI Template variables for request [/userList.html] are {} 2025-10-22 22:32:10 DEBUG SimpleUrlHandlerMapping:140 - Mapping [/userList.html] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/WEB-INF/views/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@2d8a68cc]]] and 1 interceptor 2025-10-22 22:32:10 DEBUG DispatcherServlet:951 - Last-Modified value for [/userList.html] is: -1 2025-10-22 22:32:10 DEBUG DispatcherServlet:1044 - Null ModelAndView returned to DispatcherServlet with name 'springMVC': assuming HandlerAdapter completed request handling 2025-10-22 22:32:10 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:10 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:11 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/user/list] 2025-10-22 22:32:11 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /user/list 2025-10-22 22:32:11 DEBUG RequestMappingHandlerMapping:317 - Returning handler method [public java.lang.String com.yourcompany.controller.UserController.getUserList(org.springframework.ui.Model)] 2025-10-22 22:32:11 DEBUG DefaultListableBeanFactory:251 - Returning cached instance of singleton bean 'userController' 2025-10-22 22:32:11 DEBUG DispatcherServlet:951 - Last-Modified value for [/user/list] is: -1 22:32:11.112 [http-nio-8080-exec-5] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession 22:32:11.112 [http-nio-8080-exec-5] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@5d865fa1] was not registered for synchronization because synchronization is not active 2025-10-22 22:32:11 DEBUG DataSourceUtils:110 - Fetching JDBC Connection from DataSource 22:32:11.112 [http-nio-8080-exec-5] DEBUG org.mybatis.spring.transaction.SpringManagedTransaction - JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@6ff6baeb [wrapping: com.mysql.jdbc.JDBC4Connection@2121fc6a]] will not be managed by Spring 22:32:11.112 [http-nio-8080-exec-5] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Preparing: SELECT * FROM users 22:32:11.112 [http-nio-8080-exec-5] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - ==> Parameters: 22:32:11.113 [http-nio-8080-exec-5] DEBUG com.yourcompany.dao.UserMapper.getAllUsers - <== Total: 1 22:32:11.113 [http-nio-8080-exec-5] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@5d865fa1] 2025-10-22 22:32:11 DEBUG DataSourceUtils:327 - Returning JDBC Connection to DataSource [User{id=1, name='111', email=11111}]jgeydugwu 2025-10-22 22:32:11 DEBUG DispatcherServlet:1251 - Rendering view [org.springframework.web.servlet.view.JstlView: name 'userList'; URL [/userList.html]] in DispatcherServlet with name 'springMVC' 2025-10-22 22:32:11 DEBUG JstlView:432 - Added model object 'user' of type [java.util.ArrayList] to request in view with name 'userList' 2025-10-22 22:32:11 DEBUG JstlView:166 - Forwarding to resource [/userList.html] in InternalResourceView 'userList' 2025-10-22 22:32:11 DEBUG DispatcherServlet:865 - DispatcherServlet with name 'springMVC' processing GET request for [/userList.html] 2025-10-22 22:32:11 DEBUG RequestMappingHandlerMapping:310 - Looking up handler method for path /userList.html 2025-10-22 22:32:11 DEBUG RequestMappingHandlerMapping:320 - Did not find handler method for [/userList.html] 2025-10-22 22:32:11 DEBUG SimpleUrlHandlerMapping:190 - Matching patterns for request [/userList.html] are [/**] 2025-10-22 22:32:11 DEBUG SimpleUrlHandlerMapping:219 - URI Template variables for request [/userList.html] are {} 2025-10-22 22:32:11 DEBUG SimpleUrlHandlerMapping:140 - Mapping [/userList.html] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/WEB-INF/views/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@2d8a68cc]]] and 1 interceptor 2025-10-22 22:32:11 DEBUG DispatcherServlet:951 - Last-Modified value for [/userList.html] is: -1 2025-10-22 22:32:11 DEBUG DispatcherServlet:1044 - Null ModelAndView returned to DispatcherServlet with name 'springMVC': assuming HandlerAdapter completed request handling 2025-10-22 22:32:11 DEBUG DispatcherServlet:1000 - Successfully completed request 2025-10-22 22:32:11 DEBUG DispatcherServlet:1000 - Successfully completed request
10-23
2025-10-04 18:28:02,810 DEBUG com.sjsemi.rrc.interceptor.AuthorizeInterceptor - - 用户:[JE02787]访问URL:[/rrc/login.html]耗时[44685]ms 2025-10-04 18:28:38,545 DEBUG org.mybatis.spring.SqlSessionUtils - - Creating a new SqlSession 2025-10-04 18:29:06,782 DEBUG org.mybatis.spring.SqlSessionUtils - - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@21047b8c] 2025-10-04 18:30:28,424 WARN com.alibaba.druid.pool.DruidDataSource - - get/close not same thread 2025-10-04 18:30:46,347 DEBUG org.mybatis.spring.transaction.SpringManagedTransaction - - JDBC Connection [oracle.jdbc.driver.T4CConnection@5729a452] will be managed by Spring 2025-10-04 18:31:23,510 DEBUG rrc.mybatis.mapper.MailNotificationMapper.findUnSendTopRecord - - ==> Preparing: SELECT ID, MAIL_RRC_NO, MAIL_SUBJECT, MAIL_CONTENT, MAIL_FROM, MAIL_TO, MAIL_CC, MAIL_BCC, MAIL_ATTACHMENTS, MAIL_CREAT_DATE, MAIL_CREAT_USER, MAIL_SEND_FLAG, MAIL_SEND_TIME, MAIL_FAB_SITE ,ROWNUM FROM TB_RRC_MAIL_NOTIFICATION WHERE (MAIL_SEND_FLAG IS NULL OR MAIL_SEND_FLAG !=‘1’) AND ROWNUM=1 ORDER BY MAIL_CREAT_DATE ASC 2025-10-04 18:32:15,161 DEBUG org.mybatis.spring.SqlSessionUtils - - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@21047b8c] 2025-10-04 18:32:56,663 DEBUG org.mybatis.spring.SqlSessionUtils - - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@21047b8c] 2025-10-04 18:33:10,288 DEBUG org.mybatis.spring.SqlSessionUtils - - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@21047b8c] 2025-10-04 18:33:29,159 ERROR org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler - - Unexpected error occurred in scheduled task. org.springframework.jdbc.UncategorizedSQLException: Error querying database. Cause: java.sql.SQLException: connection holder is null The error may exist in file [D:\Project\tomcat_rrc\webapps\rrc\WEB-INF\classes\com\sjsemi\rrc\mybatis\source\MailNotificationMapper.xml] The error may involve com.sjsemi.rrc.mybatis.mapper.MailNotificationMapper.findUnSendTopRecord The error occurred while executing a query SQL: SELECT ID, MAIL_RRC_NO, MAIL_SUBJECT, MAIL_CONTENT, MAIL_FROM, MAIL_TO, MAIL_CC, MAIL_BCC, MAIL_ATTACHMENTS, MAIL_CREAT_DATE, MAIL_CREAT_USER, MAIL_SEND_FLAG, MAIL_SEND_TIME, MAIL_FAB_SITE ,ROWNUM FROM TB_RRC_MAIL_NOTIFICATION WHERE (MAIL_SEND_FLAG IS NULL OR MAIL_SEND_FLAG !=‘1’) AND ROWNUM=1 ORDER BY MAIL_CREAT_DATE ASC Cause: java.sql.SQLException: connection holder is null 这段日志中,第一行用户登录花了40多秒,打电话问过他了,说那个时候点了登录后一直转圈,进不去。 然后后边日志开始报错,此时系统崩溃了,打不开
10-12
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值