实习第三天
第三天上午又再一次讲了一下分层和编写代码的一些小tips。然后把前天配的maven重新配置了一下。前天配置的时候在setting.xml中设置了一下jar包的存放目录。但是今天上课的时候老师又让我们把jar包存放在默认目录下就好。于是又删除了本地库,重新设置了一下setting.xml。下午给了我们一个博客https://blog.csdn.net/weixin_42747657/article/details/81160501让我们先自己去搭建ssm框架明天再讲解ssm。但是我搭出来有错误,也不知道怎么改。只好等明天老师上课讲解了。
目录
ssm框架搭建(bug版)
ssm框架搭建(bug版)
这是搭建完的项目框架
运行index.jsp后点击按钮原本预定进入allUser.jsp但是却出现了如下错误
HTTP Status 500 – Internal Server Error
Type Exception Report
Message Servlet.init() for servlet dispatcher threw exception
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [E:\workspace\IDEAProject\test_ssm_day3\target\first\WEB-INF\classes\spring\spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:\workspace\IDEAProject\test_ssm_day3\target\first\WEB-INF\classes\mapper\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'userResultMap'. Cause: java.lang.ClassNotFoundException: Cannot find class: userResultMap
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1710) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:583) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]
at org.springframe