Cause: org.xml.sax.SAXParseException; lineNumber: 45; columnNumber: 62; 元素內容必須由格式正確的字元資料或標記組成。
三月 09, 2018 12:13:39 下午 org.apache.catalina.core.StandardContext listenerStart 嚴重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MaraService': Cannot create inner bean '(inner bean)#293219e8' of type [com.cxf.ws.service.impl.WsMaraServiceImpl] while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '(inner bean)#293219e8': Unsatisfied dependency expressed through field 'maraService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'maraService': Unsatisfied dependency expressed through field 'maraMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'maraMapper' defined in file [G:\po\WorkSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cxf\WEB-INF\classes\com\cxf\dao\MaraMapper.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 file [G:\po\WorkSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cxf\WEB-INF\classes\spring-mybatis.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [G:\po\WorkSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cxf\WEB-INF\classes\mapper\StpoMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 45; columnNumber: 62; 元素內容必須由格式正確的字元資料或標記組成。
原因 :Mapper.xml 檔案裡 < (小於)號 , >(大於)號 ,會被認為是括號,需要額外注意,
解決方法: