[solved] closingontransa ctionalSqlSessionorg.apache.ibatis . session.defaults.DefaultSqlSession @20] No information after that.

Today in learning to follow the teacher learning Mybatis – plus technology found god in the use of the test class testing to add and delete operation, display Closing non transactional SqlSession [org. Apache. Ibatis. Session. Defaults. DefaultSqlSession @ 656922 a0] after no information feedback, no results after searching for some information.

The solution
Eventually find the main class does not start: @ MapperScan (com. Kuang. "mapper")
pay attention to the point, we need to start class up to scan our mapper package of all interface

to add @ MapperScan (" com. Kuang. Mapper ") scans we mapper under UserMapper interface inheritance parent class BaseMapper< User> . In order to identify all methods in the parent class.

import org.mybatis.spring.annotation.MapperScan;
@MapperScan("com.kuang.mapper")

Then test the class again and find that the data is present and the information is fed back.

Read More: