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") code>
pay attention to the point, we need to start class up to scan our mapper package of all interface font>
to add @ MapperScan (" com. Kuang. Mapper ") scans we mapper under code>
UserMapper code> interface inheritance parent class
BaseMapper< User> code>. 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:
- Remember a mybatis error org.apache.ibatis . session.defaults.DefaultSqlSession
- When I first learned mybatis org.apache.ibatis . binding.BindingException report errors
- Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibat
- solve org.apache.ibatis . binding.BindingException : invalid bound statement (not found)
- [Solved] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zyh.springboot.
- failed to lazily initialize a collection of role: ……, no session or session was closed
- org.apache.ibatis.type.TypeException: Error setting non null for parameter #4 with JdbcType null
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxx.dao.UserDao
- org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### The error may
- org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘com/hujin
- Error building SqlSession. ### Cause: org.apache.ibatis.builder.BuilderException: Error creating d
- Tensorflow reported an error when using session module: attributeerror: module ‘tensorflow’ has no attribute ‘session’, which has been solved
- Determining IP information for eth0… failed; no link present. Check cable?
- session_ start(): open(SESSION_ FILE, O_ Rdwr)) failed: processing of permission denied (13)
- org.apache.hadoop.hive.ql.exec.spark.SparkTask. Failed to create Spark client for Spark session 0354
- Does the version of idea2020.1 import mybayis jar package or report an error? Error: (4,28) Java: package org.apache.ibatis.io does not exist
- Solution to prompt “cannot find module ‘eslint config defaults / configurations / eslint'” when submitting with Git
- Job for apache2.service failed apache2 cannot be started
- Solution of no input file specified. In local server Apache
- Apache service can’t be started under xampp, reporting port occupancy class error [error] Apache will not start without the configured ports free!