1、Connection *** will not be managed by Spring
解决方案:首先需要在XML文件中开启事务管理,即dispatcher-servlet.xml中加入
最后在Service接口上添加@Transactional注解。
2、No qualifying bean of type [springMybatisNoXml.RoleMapper] found for dependency解决方案:首先在ServiceImpl中使用@Autowired注解注入Mapper,代码如下:
@Autowired private RoleMapper roleMapper = null;
然后在Mapper接口上添加@Repository注解。
3、无法在web.xml或使用此应用程序部署的jar文件中解析绝对uri:[http://java.sun.com/jsp/jstl/core]解决方案:导包,即jstl-1.2.jar
4、Cannot load JDBC driver class ${driverClassName}解决方案:sqlSessionFactory属性加载数据源时,${}尚未解析配置文件,导致将${driverClassName}读取为驱动类的值,而不是配置值com.mysql.jdbc.Driver。将applicationContext.xml中关于MapperScannerConfigurer的代码
改为



