如果你没有按照同包同名来,就要下面的配置,指定好路径 1.把路径改为类下面的xml文件 #指定xml映射文件的位置 mybatis.mapper-locations=classpath:mapper/*.xml