记录一个困扰我很久的问题
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'convertFileMapper' defined in file [D:\Documents\Desktop\ending\backstage-graduation\target\classes\com\fanr\graduation\mapper\ConvertFileMapper.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException
这张数据库表是用easycode自动生成的各层代码,其中启动的时候就会报错
A component required a bean of type 'com.fanr.graduation.mapper.ConvertFileMapper' that could not be found.
这里提示的这个错是说扫描不到mapper包,但是我在convertFileMapper下已经使用了@Mapper注解,没有用,只能在启动类上加@MapperScan();
@MapperScan(value = {"com.fanr.graduation.mapper"})
这里应该是我的jar包版本冲突的问题,我没有深究,但是,现在就出现了根本的问题
Error creating bean with name 'convertFileMapper' defined in file [D:\Documents\Desktop\ending\backstage-graduation\target\classes\com\fanr\graduation\mapper\ConvertFileMapper.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException
到此为止还是没有找到相应的解决办法,我现在尝试将这张表的各层代码都重写一遍,因为只有这张表出现了问题,还不确定有什么问题,
好烦呀!!!