21-Nov-2019 13:03:36.860 WARNING [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dicServiceImpl': Unsatisfied dependency expressed through field 'typeDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dicTypeDao' defined in file [D:\ideaWorkspace\projectForCRM\crm\target\crm-1.0-SNAPSHOT\WEB-INF\classes\com\bjpowernode\crm\settings\dao\DicTypeDao.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{editTime,editBy}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
21-Nov-2019 13:03:36.864 INFO [RMI TCP Connection(3)-127.0.0.1] com.alibaba.druid.pool.DruidDataSource.info {dataSource-1} closed
21-Nov-2019 13:03:36.872 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dicServiceImpl': Unsatisfied dependency expressed through field 'typeDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dicTypeDao' defined in file [D:\ideaWorkspace\projectForCRM\crm\target\crm-1.0-SNAPSHOT\WEB-INF\classes\com\bjpowernode\crm\settings\dao\DicTypeDao.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{editTime,editBy}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
解决这个异常问题,看抛出的异常最后一句都会有错误原因、提示哪里出错,找出现的位置,进行修改
这里是在mapper.xml文件中的字段赋值,将两个字段写在一个大括号中