SpringBoot异常集

异常及解决办法

spring 及 springboot 异常

1.springboot测试类运行报错找不到测试类

报:Class not found com.cy.cj.common.cache.DefaultTest
SpringBoot异常集_第1张图片
原因 检查发现pom.xml文件中少添加了下面的依赖


    org.junit.platform
    junit-platform-launcher

mybatis异常及解决办法

1.永和项目门店信息修改页面数据呈现报错

exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'com.tedu.dao.DoorMapper.findById'.  It's likely that neither a Result Type nor a Result Map was specified.] with root cause

原因 检查发现mapper.xml文件的select标签少了resultType