【Bug记录】org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessi

编写好applicationContext.xml后启动Tomcat7.0, 出现以下错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sessionFactory’ defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [com/lhl/expbos/model] cannot be resolved to URL because it does not exist

接着查看out包发现里面没有com/lhl/expbos/model路径,同时发现包里有文件的路径才有被打包,所以在model下写了个User类,再重启Tomcat发现问题解决了。

发布了4 篇原创文章 · 获赞 0 · 访问量 202

猜你喜欢

转载自blog.csdn.net/weixin_46141350/article/details/104082452