2014/08/16 Record
Today, I have a problem, I'm about 4 hours, good pit, because I haven't met before.
My bag is so divided: Com. project name. Module name. Service.impl In spring Configure this facet execution (* com. Project name. *impl.* (..)) He just can't find COM. project name. Module NAME. Service.impl the following *impl class
And this configuration even wrong, he does not error, and when I test with junit simultaneously, loading three configuration files Springmvc.xml spring.xml spring-mybatis.xml It is normal, once through the Web initialization of the problem, If the web loads three files at the same time, it will not be a problem, and when he does so, only the log files are logged as follows:
debug-sqlsession [[email protected]] was wasn't registered for synchronization because synchronization are not active
Debug-fetching JDBC Connection from DataSource
DEBUG-JDBC Connection [[email protected]] won't is managed by Spring
Debug-ooo Using Connection [[email protected]
DEBUG-==> Preparing:select * from Test where testid=?
DEBUG-==> parameters:1 (Integer)
DEBUG-<== Total:1
debug-closing Non transactional sqlsession [[email protected]]
Debug-returning JDBC Connection to DataSource
When changed to such execution (* com. Project name: *.*(..)) Then everything returned to normal, and the project name of the execution to change, he did not error, can access the database, the log is like the above
Sqlsession cannot synchronize the connection agent cannot be managed by spring and he can access the database as well, then the connection pool is still valid because his transaction management is invalidated and therefore does not roll back. Therefore, I do not have a system to learn mybatis, the cost of a long time, today to record, in case of errors later, I hope to encounter this problem developers note