在spring + springmvc + mybatis中出现Error creating bean with name 'sqlSessionFactory' defined in file

在spring + springmvc + mybatis中出现Error creating bean with name 'sqlSessionFactory' defined in file

    • 1、在idea中打开Project Structure
    • 2、检查Artifacts中的xxxx:war_exploded下是否有波浪线,如有就说明你的output Layout有问题
    • 3、把原来的xxxx:war_exploded删除
    • 4、删除后点击+号,选中第二个Web Application:Exploded和From Mouduls
    • 5、选中项目
    • 6、发现波浪线消失了,重启Tomcat,问题可以解决。

1、在idea中打开Project Structure

在spring + springmvc + mybatis中出现Error creating bean with name 'sqlSessionFactory' defined in file_第1张图片

2、检查Artifacts中的xxxx:war_exploded下是否有波浪线,如有就说明你的output Layout有问题

在spring + springmvc + mybatis中出现Error creating bean with name 'sqlSessionFactory' defined in file_第2张图片

3、把原来的xxxx:war_exploded删除

在spring + springmvc + mybatis中出现Error creating bean with name 'sqlSessionFactory' defined in file_第3张图片

4、删除后点击+号,选中第二个Web Application:Exploded和From Mouduls

在spring + springmvc + mybatis中出现Error creating bean with name 'sqlSessionFactory' defined in file_第4张图片

5、选中项目

在spring + springmvc + mybatis中出现Error creating bean with name 'sqlSessionFactory' defined in file_第5张图片

6、发现波浪线消失了,重启Tomcat,问题可以解决。

在spring + springmvc + mybatis中出现Error creating bean with name 'sqlSessionFactory' defined in file_第6张图片

总结:一开始出现这个问题,我也很无奈,但看着报错的原因,一步步地去排查问题,最终解决问题了,心里还是很开心的。

你可能感兴趣的:(Error,creating,bean,with,name,'sql)