发表于: 2017-06-24 23:46:48
1 1623
今天所做:
跟各种报错打交道一个小时。昨天把任务一时候的单元测试弄好后,今天打算开始从controller开始的,但今天打开idea运行时,又不行了。
最开始是这种:
[WARNING] unavailableorg.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from class path resource [] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。
修改一番后出现其它的。
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-dao.xml]: Invocation of init method failed;
nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis/mybatis.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource mysql.properties
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-dao.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'dataSource' is required
截张图 student类set get 方法not used 重新导入的没出现此问题
之前运行时候 有找不到rec_Senior的getter方法,以及下面的Method is never used 。也是找了半天原因。
无法自动装配bean 但是单元测试又毫无问题
重新把昨天最原始的文件导入idea,重新开始修改。
很乱,见多了就熟了吧。
评论