前言
短话长说:
我并未系统的看过mybatis逆向工程,仅仅是会生成、调方法而已,注定造成了在遇到bug时,将付出巨大的时间成本。
不久前因为改了数据库的表,重新生成了mapper,然后服务器就启动不了了。。。
看报错讲的主要是某个mapper文件中的某个对象已经创建,不能重复创建,可是我根本就没有动那个mapper。
问题
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘airMapper’ defined in file ---
根源
逆向工程创建mapper是会追加,不会重写
解决
删除airmapper,重新生成