SSM配置spring-mybatis.xml扫描xml时报错

配置spring-mybatis.xml时,在扫描xml时一致提示报错:

报错

结构

网上找了好多,都不行,求大神帮忙,万分感谢!

13个回答

图片说明

muyoufansem
木有饭 感谢回复,试了你的方式还是不行。0.0
大约一年之前 回复

建议你将mapper文件放在resources目录下。新建一个文件夹存放mapper文件,然后在spring-mybatis.xml中这样做:


<!-- 自动扫描mapping.xml文件 -->

 <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <!-- 自动扫描mapping.xml文件 -->
        <property name="mapperLocations" value="classpath:mapper/*.xml" />
    </bean>
muyoufansem
木有饭 按照你说的,重新建立了一个文件夹在resources下,但是还是显示报红,如下图!
大约一年之前 回复

图片说明

value= "classpath*:mapper/*.xml"试试有木有用呢

muyoufansem
木有饭 感谢回复,试了你的方式还是不行。0.0
大约一年之前 回复

建议用spring-mybatis.xml 使用mybatis.xml 分离的方式,比较明了。就算整合在spring-mybatis.xml中也还是需要mybatis.xml:
配置 spring-mybatis.xml 引用mybatis 的配置文件




在 mybatis.xml 中配置
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">






<!-- 方式一:mapper需要的xml放在dao目录下,会自动识别同名xml文件 -->

<!-- 方式二:class 级别的指定,会自动识别类同目录下同名xml文件 -->

<!-- 方式三:指定Mapper的位置 无需classpath-->


如果非要在spring-mybatis.xml 里配置 注意路径斜杆开头(classpath:/):

如果非要在spring-mybatis.xml 里配置 注意路径斜杆开头(classpath:/):

试试:

 <property name="mapperLocations" value="classpath:/mapper/**/*.xml"/>

xml表头信息正确了吗

IDEA 的问题,重置facets的spring
图片说明
图片说明

先删除,然后在重新加载,点加号,选择spring,全选右侧xml

muyoufansem
木有饭 感谢回复,试了你的方式还是不行。0.0
大约一年之前 回复
共13条数据 1 尾页
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
ssm事务配置报错
Failed to introspect Class [org.springframework.aop.aspectj.AspectJExpressionPointcut] from ClassLoader [ParallelWebappClassLoader &lt;!-- ============================事务控制的配置==========================...
SSM xml 配置
配置ssm框架的结构ssmclass的配置:src WebContent springMVC-servlet.xml
ssm框架下的网上书城项目的开发-spring-mybatis.xml配置
首先我们建一个连接数据库的配置文件jdbc.properties 其中需要你配置的有你的数据库名,用户名和密码。需要注意的是mysql8.0以后的版本的连接方式改变了。本文用的是8.0以后的版本,如果是8.0之前的版本,需要你对driverClassName和url做出修改。 driverClassName=com.mysql.cj.jdbc.Driver url=jdbc\:mysql\:...
SSM框架整合Druid时报错
在spring-config配置文件中配置好druid的数据源后,控制台报错SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.f...
spring-mybatis.xml配置文件
主要用于spring和mybatis的整合,实现SSM架构的应用。
SSM中web.xml中配置错误页面时<error-page> ()报错
报错详情: Multiple annotations found at this line: - cvc-complex-type.2.2: Element 'location' must have no element [children], and the value must  be valid. 页面显示错误: 报错原因: 错误页面路径格式有误. 解决办法:在错误页面前
配置jpetstore-4.0.5 时报错
配置jpetstore-4.0.5 时,环境为,win2003+MSSQLserver+tomcat5.0;rn数据库链接配置:rndriver=com.microsoft.jdbc.sqlserver.SQLServerDriverrnUrl=jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=JPetStore;SelectMethod=cursorrnUser=sarnPass=123456rn错误提示为:rnjavax.servlet.jsp.JspException: Exception creating bean of class com.ibatis.jpetstore.presentation.CatalogBean: 1rnrn请问是怎么回事?rn还有在另外一台机器上,能进入但是不显示商品,配置完全一样。数据库为MSSQL Server的查询分析器执行程序所带脚本。rn
配置Maven时报错
1.Maven构建失败 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3 . 2 :compile ( default-compile) on project oecp: Compilation failure  结果就是jdk出错 使用自己的安装的JDK 就好了  
ssm报错
错误如下:12-Apr-2018 23:50:10.570 信息 [RMI TCP Connection(6)-127.0.0.1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath 12-Apr-2018 23:50:10....
dom4j解析XML时,报错
错误:rnorg.dom4j.DocumentException: Error on line 0 of document : The encoding "GBK" is not supported. Nested exception: The encoding "GBK" is not supported.rn at org.dom4j.io.SAXReader.read(SAXReader.java:482)rn at org.dom4j.io.SAXReader.read(SAXReader.java:264)rn at tt.UpdateXML.main(UpdateXML.java:16)rnNested exception: rnorg.xml.sax.SAXParseException: The encoding "GBK" is not supported.rn at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1196)rn at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:541)rn at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:312)rn at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1080)rn at org.dom4j.io.SAXReader.read(SAXReader.java:465)rn at org.dom4j.io.SAXReader.read(SAXReader.java:264)rn at tt.UpdateXML.main(UpdateXML.java:16)rnNested exception: org.xml.sax.SAXParseException: The encoding "GBK" is not supported.rn at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1196)rn at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:541)rn at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:312)rn at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1080)rn at org.dom4j.io.SAXReader.read(SAXReader.java:465)rn at org.dom4j.io.SAXReader.read(SAXReader.java:264)rn at tt.UpdateXML.main(UpdateXML.java:16)rnrn貌似是编码的问题是吧?rn我前面创建该XML的时候,设置的就是“GBK”的。
ssm框架连接配置applicationContext.xml运行时报错
**严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/ibatis/session/SqlSessionFactory**rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)rn at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:116)rn at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841)rn at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)rn at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)rn at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)rn at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)rn at java.base/java.lang.Thread.run(Thread.java:844)rnrn**Caused by: java.lang.NoClassDefFoundError: org/apache/ibatis/session/SqlSessionFactory**rn at java.base/java.lang.Class.getDeclaredMethods0(Native Method)rn at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3119)rn at java.base/java.lang.Class.privateGetPublicMethods(Class.java:3144)rn at java.base/java.lang.Class.getMethods(Class.java:1863)rn at org.springframework.beans.ExtendedBeanInfoFactory.supports(ExtendedBeanInfoFactory.java:54)rn at org.springframework.beans.ExtendedBeanInfoFactory.getBeanInfo(ExtendedBeanInfoFactory.java:46)rn at org.springframework.beans.CachedIntrospectionResults.(CachedIntrospectionResults.java:275)rn at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:188)rn at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:327)rn at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:359)rn at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:438)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1458)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1197)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn ... 24 morernrn**Caused by: java.lang.ClassNotFoundException: org.apache.ibatis.session.SqlSessionFactory**rn at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)rn at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)rn ... 38 morernrndb.properties文件,mysql8.0rn```rnjdbc_username=rootrnjdbc_password=aaarnjdbc_driver=com.mysql.cj.jdbc.Driverrnjdbc_url=jdbc\:mysql\://localhost\:3306/aaaaa_db?useSSL\=false&serverTimezone\=GMTrnrn```rnrnapplicationContext.xml代码如下rn```rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn```
求助! 集成SSM框架时报错
[img=https://img-bbs.csdn.net/upload/201709/25/1506271302_954928.png][/img]rn[img=https://img-bbs.csdn.net/upload/201709/25/1506271326_788262.png][/img][img=https://img-bbs.csdn.net/upload/201709/25/1506271341_31835.png][/img]rnrn说 List list = service.findAgent(); 这一句报错 数据我有哈rnrn麻烦大佬们看看
ssm使用pagehelper进行分页时报错
不使用pagehelper进行分页时可以查询出数据,使用pagehelper进行分页时报错.rn预估错误原因是sql中使用了union all,rnpagehelper进行select count(0)报错.rn1.使用PageHelper进行分页询rn@RequestMapping("searchmyArticle.do")rn @ResponseBodyrn public String searchmyArticle(HttpServletRequest request, HttpServletResponse response) throws IOExceptionrn //获取默认行rn String pageNum = request.getParameter("pageNum");rn int curNum = (pageNum==null || "".equals(pageNum)) ? 1 : Integer.valueOf(pageNum);rn //设置当前页及行数rn PageHelper.startPage(curNum, 10);rn /****** 分页 end*******/rn log.info("[log]按条件筛选文章");rn String userId = request.getParameter("userId");rn String title = request.getParameter("sstj");rn if(title != null) title = URLDecoder.decode(title, "UTF-8");rn List alist = articleService.findArticleByTitle(userId, title);rn //把List集合以JSONArray的形式传到页面上处理rn PageInfo pi = new PageInfo(alist);rn //JSONArray array = JSONArray.fromObject(pi);rn //response.getWriter().print(array);rn return new Gson().toJson(pi);rn rn2多表查询 使用了union all合并,sql在pl/sql运行没问题.rnrn3报错信息如下:rnorg.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoSuchMethodError: net.sf.jsqlparser.statement.select.SetOperationList.getSelects()Ljava/util/List;rnat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:820)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)rn at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)rn at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)rn at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)rn at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)rn at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)rn at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)rn at com.qx.portal.util.LoginFilter.doFilter(LoginFilter.java:62)rn at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)rn at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)rn at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)rn at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)rn at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)rn at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)rn at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)rn at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)rn at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)rn at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)rnCaused by: java.lang.NoSuchMethodError: net.sf.jsqlparser.statement.select.SetOperationList.getSelects()Ljava/util/List;rn at com.github.pagehelper.parser.CountSqlParser.processSelectBody(CountSqlParser.java:180)rn at com.github.pagehelper.parser.CountSqlParser.processFromItem(CountSqlParser.java:251)rn at com.github.pagehelper.parser.CountSqlParser.processPlainSelect(CountSqlParser.java:207)rn at com.github.pagehelper.parser.CountSqlParser.processSelectBody(CountSqlParser.java:172)rn at com.github.pagehelper.parser.CountSqlParser.processFromItem(CountSqlParser.java:251)rn at com.github.pagehelper.parser.CountSqlParser.processPlainSelect(CountSqlParser.java:207)rn at com.github.pagehelper.parser.CountSqlParser.processSelectBody(CountSqlParser.java:172)rn at com.github.pagehelper.parser.CountSqlParser.getSmartCountSql(CountSqlParser.java:86)rn at com.github.pagehelper.dialect.AbstractDialect.getCountSql(AbstractDialect.java:55)rn at com.github.pagehelper.util.SqlUtil.doIntercept(SqlUtil.java:139)rn at com.github.pagehelper.util.SqlUtil.intercept(SqlUtil.java:84)rn at com.github.pagehelper.PageHelper.intercept(PageHelper.java:50)rn at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:57)rn at $Proxy182.query(Unknown Source)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)rn at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:355)rn at $Proxy60.selectList(Unknown Source)rn at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:195)rn at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:114)rn at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:58)rn at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43)rn at $Proxy107.findArticleByTitle(Unknown Source)rn at com.qx.portal.service.MhArticleService.findArticleByTitle(MhArticleService.java:114)rn at com.qx.portal.controller.MhArticleController.searchmyArticle(MhArticleController.java:260)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710)rn at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167)rn at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414)rn at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:402)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)rn ... 24 morern<2018-2-23 上午10时07分43秒 CST> <[ServletContext@1908659476[app:_appsdir_QX_dir module:QX path:/QX spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@1b439463[rnPOST /QX/searchmyArticle.do HTTP/1.1rnConnection: keep-alivernContent-Length: 29rnAccept: application/json, text/javascript, */*; q=0.01rnOrigin: http://localhost:7001rnX-Requested-With: XMLHttpRequestrnUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3294.6 Safari/537.36rnContent-Type: application/x-www-form-urlencoded; charset=UTF-8rnReferer: http://localhost:7001/QX/findArticle.dornAccept-Encoding: gzip, deflate, brrnAccept-Language: zh-CN,zh;q=0.9rnCookie: password=; user=zhangru; JSESSIONID=QKXKhPzYLSkZyJBZv6mx78CN8P2sML5v6nWBNQJlDJzY57KpQt1s!888419628rnrn]] Root cause of ServletException.rnjava.lang.NoSuchMethodError: net.sf.jsqlparser.statement.select.SetOperationList.getSelects()Ljava/util/List;rn at com.github.pagehelper.parser.CountSqlParser.processSelectBody(CountSqlParser.java:180)rn at com.github.pagehelper.parser.CountSqlParser.processFromItem(CountSqlParser.java:251)rn at com.github.pagehelper.parser.CountSqlParser.processPlainSelect(CountSqlParser.java:207)rn at com.github.pagehelper.parser.CountSqlParser.processSelectBody(CountSqlParser.java:172)rn at com.github.pagehelper.parser.CountSqlParser.processFromItem(CountSqlParser.java:251)rn Truncated. see log file for complete stacktracern> rn
ssm框架运维报错(数据库连接时出错)
今早发现了一个很奇怪的东西,服务器上前后测试了好几次的程序突然崩了,之前运行非常稳定,这是报错,目标是我数据库,大家有没有懂的nn```n 27-Mar-2018 07:34:41.680 严重 [https-jsse-nio2-443-exec-2] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.RecoverableDataAccessException: n### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 32,986,781 milliseconds ago. The last packet sent successfully to the server was 32,986,781 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.n### The error may exist in file [C:\Program Files\Apache Software Foundation\Tomcat 9.0_Tomcat9.0\webapps2\ShowHTML\WEB-INF\classes\mapper\student_infoMapper.xml]n### The error may involve com.cn.fenyu.dao.student_infoMapper.selectByExample-Inlinen### The error occurred while setting parametersn### SQL: select studentID, studentpw, power, studentname from student WHERE ( studentID = ? )n### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 32,986,781 milliseconds ago. The last packet sent successfully to the server was 32,986,781 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.n; SQL []; The last packet successfully received from the server was 32,986,781 milliseconds ago. The last packet sent successfully to the server was 32,986,781 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 32,986,781 milliseconds ago. The last packet sent successfully to the server was 32,986,781 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.] with root causen java.net.SocketException: Software caused connection abort: socket write errorn at java.net.SocketOutputStream.socketWrite0(Native Method)n at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)n at java.net.SocketOutputStream.write(SocketOutputStream.java:155)n at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)n at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)n at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3964)n at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2596)n at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)n at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)n at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)n at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1307)n at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:63)n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)n at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)n at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)n at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:141)n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)n at com.sun.proxy.$Proxy111.query(Unknown Source)n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)n at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)n at java.lang.reflect.Method.invoke(Method.java:498)n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)n at com.sun.proxy.$Proxy45.selectList(Unknown Source)n at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)n at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137)n at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75)n at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)n at com.sun.proxy.$Proxy46.selectByExample(Unknown Source)n at com.cn.fenyu.servies.MainServies.finduser(MainServies.java:34)n at com.cn.fenyu.controller.MainController.indexshow(MainController.java:149)n at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)n at java.lang.reflect.Method.invoke(Method.java:498)n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)n at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)n at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)nn```nn
SSM配置问题:扫描问题
问题:无法自动装配 @Autowire 出错,说明没有扫描到此包解决:1、未扫描某包的目录,加入如下“扫描”配置属性,具体加入哪个配置文件,数据库相关的放在spring-mabatis联合配置文件或者mybatis配置文件中都行,service等放在springMVC配置文件下即可&amp;lt;context:component-scan base-package=&quot;com.spring.control...
在配置compass的cfg.xml时,报错打不开xml,求解!!!!!!!!!!
我在使用compass的时候,写了个它的cfg.xml。但是运行的时候,报错:Caused by: org.compass.core.config.ConfigurationException: Failed to open config resource [/compass.cfg.xml]rnrncompass.cfg.xml原文如下:[code=Java]rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrn[/code]rnrn中间用到的两个路径,我不知道是否和这个错误有关,我的实例类是放在src文件夹下的一个名为abc的包里的,我的索引文档是放在与src同目录下的文件夹1里的,xml是放在与src同目录的文件夹2里的。rnrn请问,这到底是什么原因呢?rn是xml写错了?还是中间路劲有问题呢?
Loading XML bean definitions from class path resource [spring-mybatis.xml]
[img=https://img-bbs.csdn.net/upload/201609/11/1473577713_216040.png][/img]rnrn求大神指点
MyEclipse配置servers时报错!
MyEclipse配置servers时报错!rnrn提示错误:java.lang.ArrayIndexOutOfBoundsExceptionrn哪位知道这是怎么回事?怎么解决?感谢rn[img=C:\Documents and Settings\Administrator\桌面\1.jpg][/img]rnrnrn
自动配置工具时报错
windows2003上装oracle9i后,在自动 配置工具 时报错rnrn
SSM配置
一、配置文件: 1、pom.xml依赖文件: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.ap
ssm配置
就在昨天有人问我关于smm框架的配置,然后让我改Bug。 结果尴尬了,一直用SpringBoot开发导致对于配置方面开始模糊了。这时候只能看之前的代码 了。电脑又没有带,想了想就只能发布下自己之前做过的一些简单配置方便以后的参考。 后续会有更详细的整理。ssm 也是用了很久了,等有空的时候在发布。如果有什么疑问也可以一起讨论下,正好我可以复习。 SpringMVC.xml 配置 &amp;lt;b...
SSM 配置
pom.xml(parent): http://xxxxx http://xxxxx http://xxxxx http://xxxxx UTF-8 false 1.0.0-SNAPSHOT 1.6 qa 3.1.0 4
配置默认action时报错
错误描述:Caused by: 元素类型为 "package" 的内容必须匹配 "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-exception-mappings?,action*)" 该错误的意思是:pa
配置DUBBO服务时报错
1、今天在配置dubbo服务的时候报错。 1.1、从网上找了很多信息,非常有用但是都不全,害的我一个个找,让我很烦。所以就现在就自己全部总结在一起。 1.2、这个问题的产生是因为http://code.alibabatech.com/schema/dubbo这个网站无法访问了。所以就下载不到dubbo.xsd这个文件。因此,第一步就是直接去下载dubbom.xsd文件。 下载地址:htt...
配置SSM
https://www.cnblogs.com/xiaotong1223/p/9201614.html https://www.cnblogs.com/fightingcoding/p/component-scan.html https://www.cnblogs.com/coprince/p/6424758.html
hibernate3.6.10配置二级缓存时报错
项目已经进行一段了,今天要给项目添加hibernate的二级缓存,在hibernate3.6.10的文件夹下没有找到ehcache的jar包,就没有导入任何jar包。rn首先在Spring的配置文件添加这样的配置信息:[code=html]rn rn rn rn rn rn rn rn [/code]上面这段配置文件的后三个property是新添加的。同时添加了ehcache.xml配置文件:[code=html]rnrn rn rnrnrn[/code]rn在其中一个*.hbm.xml添加,然后开始测试,结果报错了,错误信息如下:[code=html]18:09:58,419 ERROR ContextLoader:215 - Context initialization failedrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'moduleServiceImpl': Injection of resource fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\develop\ZYPT\.metadata\.me_tcat\webapps\zypt\WEB-INF\classes\applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'hibernate.cache.use_second_level_cache' of bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Nested property in path 'hibernate.cache.use_second_level_cache' does not exist; nested exception is org.springframework.beans.NotReadablePropertyException: Invalid property 'hibernate' of bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Bean property 'hibernate' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessAfterInstantiation(CommonAnnotationBeanPostProcessor.java:292)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:566)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rnCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\develop\ZYPT\.metadata\.me_tcat\webapps\zypt\WEB-INF\classes\applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'hibernate.cache.use_second_level_cache' of bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Nested property in path 'hibernate.cache.use_second_level_cache' does not exist; nested exception is org.springframework.beans.NotReadablePropertyException: Invalid property 'hibernate' of bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Bean property 'hibernate' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:435)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:409)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:537)rn at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:180)rn at org.springframework.beans.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessAfterInstantiation(CommonAnnotationBeanPostProcessor.java:289)rn ... 40 more[/code]。rnrn是不是说我应该导入一个ehcache的jar包,还是说我的配置哪里错了,请大神们指点一下
SSM配置,
我们都知道Spring核心是AOP和IOC,
SSM搭建-SSM核心配置
本课程结合小型博客系统,讲解百度富文本编辑器UEditor的使用,掌握UEditor编辑器在实际项目中的应用
ssm关于加载mapper文件扫描不出来报错问题
之前集成ssm框架,启动tomcat总是报错,加载mapper文件扫描不出来报错,找不到原因,然后费劲脑筋,突然发现target里面的war包没包含mapper.xml文件进来,才导致启动失败。 解决方法很简单,直接在pom.xml文件加入该段配置即可! src/main/java**/*.properties**/*.xmlfalse
SSM框架整合报错
1.jdbc报错:java.lang.ClassNotFoundException: com.mysql.jdbc.driver 严重: Servlet.service() for servlet [daleystore-manager] in context with path [] threw exception [Request processing failed; nested ex
ssm框架定时任务报错
在ssm框架早定时任务task时,有没有碰到报错 Referenced file contains errors (http://www.springframework.org/schema/task) 如果有,恭喜你,你不是一个人.... 错误的原因特别脑残~~就是你在xsi里边,task的两行代码把原来的结构破坏了,比如你插入了beans两条代码或者其他的两行代码中间,避免遇到这种情况就不
ssm中遇到的报错
错误总是能让人成长的最快。今天重新用maven搭建ssm框架,身为小白的我,又被各种报错虐。真的是报错虐我千百遍,我待报错如初恋。话不多说上报错:     1、错误:找不到oracle驱动          原因: maven中央仓库对oracle驱动包支持不是很好,可以手动添加驱动包到仓库         解决方法:1.1查看本机oracle的版本     执行如下命令sqlplus  
整合ssm报错
rnjdbc.properties文件:rndriver=com.mysql.jdbc.Driverrnurl=jdbc:mysql://localhost:3306/mysql?useUnicod=true&charcterEncoding=UTF-8&zeroDateTimeBehavior=convertToNullrnusername=pzprnpassword=musicrn#定义初始连接数rninitialSize=0 rn#定义最大连接数rnmaxActive=20 rn#定义最大空闲 rnmaxIdle=20 rn#定义最小空闲 rnminIdle=1rn#定义最长等待时间 rnmaxWait=60000rnrnspring.xml:rnrnrn rn rnrnrn rn rn rnrn rn rnrnrnspring-mybatis.xmlrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rnrn rn rn rn rnrn rn rn rn rn rn rnrn rn rn rn rnrn rn rn rn rnrnrnrnrn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rn rnrn rnrn rn rn rnrnrn rn rn rn rn rn sy.service.*rn rn rn rn rn rn rnrnmaven-pom。xml:rnrn rn org.springframeworkrn spring-testrn 3.2.0.RELEASErn rn rn org.springframeworkrn spring-webmvcrn 3.2.0.RELEASErn rn rn org.springframeworkrn spring-corern 3.2.0.RELEASErn rn rn org.mybatisrn mybatisrn 3.1.1rn rn rn org.mybatisrn mybatis-springrn 1.1.1rn rn rn mysqlrn mysql-connector-javarn 5.1.21rn rn rn junitrn junitrn 4.11rn testrn rn rn com.alibabarn druidrn 0.2.9rn rn rn org.aspectjrn aspectjweaverrn 1.7.1rn rn rn org.codehaus.jacksonrn jackson-mapper-aslrn 1.9.11rn rn rn commons-fileuploadrn commons-fileuploadrn 1.2.2rn rn rn javax.servletrn servlet-apirn 3.0-alpha-1rn rn rn log4jrn log4jrn 1.2.17rn rn rn com.alibabarn fastjsonrn 1.1.26rn rn rn commons-poolrn commons-poolrn 1.3rn rn rnrnTest:rn @Testrn public void Test()rn ApplicationContext ac=new ClassPathXmlApplicationContext(new String[]"spring.xml","spring-mybatis.xml");rn /* IUsersService us=(IUsersService)ac.getBean("usersService");rn Users users=us.getUsersById("1");rn System.out.print(users.toString());*/rn rn rnrnexception:rn [img=https://img-bbs.csdn.net/upload/201509/20/1442720401_895709.jpg][/img]rn[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/35.gif][/img]rn
ssm基础增删改查报错
报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.shopmall.eshop.biz.sysmng.operatormng.service.ManagerService.getFleetManagerByOpenIdrn严重: Servlet.service() for servlet [rest] in context with path [/oil_credit] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.shopmall.eshop.biz.sysmng.operatormng.service.ManagerService.getFleetManagerByOpenId] with root causernorg.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.shopmall.eshop.biz.sysmng.operatormng.service.ManagerService.getFleetManagerByOpenIdrnAccessLogValve.invoke(AccessLogValve.java:962)rnrnrnrnsql:rnrnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn MANAGER_ID,OPEN_ID,MANAGER_NAME,FLEET_ID,PHONE,INVITE_CODE,IS_STATE,CREATEDATE,CREATETIMErn rn rn select rn rn from fleet_manager arn where OPEN_ID = #OPEN_IDrn rnrnrnrndao:rnpackage com.shopmall.eshop.biz.sysmng.operatormng.dao;rnrnimport java.util.List;rnrnimport org.apache.ibatis.annotations.Param;rnrnimport com.shopmall.eshop.biz.sysmng.operatormng.entity.FleetManager;rnrnpublic interface ManagerDao rn rn /**rn * 微信id查询操作员rn *rn */ rn FleetManager selectByOpenId(@Param("open_id")String open_id);rn rn /**rn * 微信id删除操作员rn *rn */rn void deleteFleetManager(@Param("open_id")String open_id);rn rn /**rn * 所属车队增加操作员rn *rn */rn FleetManager insertFleetManager(@Param("fleet_id")String fleet_id);rn rn /**rn * 所属车队删除操作员rn *rn */rn FleetManager updateFleetManager(@Param("fleet_id")String fleet_id);rn rn /**rn * 所属车队列表rn *rn */rn List getFleetId(@Param("fleet_id")String fleet_id);rnrnrnrnservice:rnpackage com.shopmall.eshop.biz.sysmng.operatormng.service;rnrnimport com.shopmall.eshop.biz.sysmng.operatormng.entity.*;rnrnrnpublic interface ManagerService rn public FleetManager getFleetManagerByOpenId(String openId); rnrnrnserviceImpl:rnpackage com.shopmall.eshop.biz.sysmng.operatormng.service.impl;rnrnimport javax.annotation.Resource;rnrnimport org.springframework.stereotype.Service;rnrnimport com.shopmall.eshop.biz.sysmng.operatormng.dao.ManagerDao;rnimport com.shopmall.eshop.biz.sysmng.operatormng.entity.FleetManager;rnimport com.shopmall.eshop.biz.sysmng.operatormng.service.ManagerService;rnrnrn@Service("managerService") rnpublic abstract class ManagerServiceImpl implements ManagerService rn @Resourcern private ManagerDao managerDao;rnrn public FleetManager getFleetManagerByOpenId(String openId) rn System.out.print(this.managerDao.selectByOpenId(openId).getMANAGER_ID());rn return this.managerDao.selectByOpenId(openId);rn rn rnrncontroller:rnpackage com.shopmall.eshop.biz.sysmng.operatormng.controller;rnimport javax.annotation.Resource;rnimport javax.servlet.http.HttpServletRequest;rnrnimport org.springframework.stereotype.Controller;rnimport org.springframework.ui.Model;rnimport org.springframework.web.bind.annotation.RequestMapping;rnrnimport com.shopmall.eshop.biz.sysmng.operatormng.entity.FleetManager;rnimport com.shopmall.eshop.biz.sysmng.operatormng.service.ManagerService;rnrn@Controllerrn@RequestMapping("/eshop/biz/sysmng/operatormng")rnpublic class ManagerController rn @Resourcern private ManagerService managerService;rn rn //查询显示rn @RequestMapping("/index") rn public String toIndex(HttpServletRequest request,Model model) rn String openId = request.getParameter("openId");rn FleetManager fleetmanager = this.managerService.getFleetManagerByOpenId(openId); rn model.addAttribute("fleetmanager", fleetmanager); rn return "/oilcredit/biz/sysmng/operatormng/index";rn rn
SSM整合报错
在ssm整合中遇到的找不到bean的异常,记录一下。 在项目部署到Tomcat中后启动报错:Error creating bean with name 'XXXController': Unsatisfied dependency expressed through field 'XXXService'; 或:No qualifying bean of type 'com.xx.service
搭建ssm报错记录
搭建ssm项目记录错误,并记录解决办法一、无法正常启动启动Tomcat 1.1.检查了有没有Tomcat的jar。 1.2.检查pom.xml中是否引入了servlet。&amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;javax.servlet&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;javax.servlet-api&amp;lt;/artifactI...
ssm整合报错
NoSuchBeanDefinitionException
ssm整合dubbo报错
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.fact...
ssm项目莫名其妙报错
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [beans.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\web\apache-tomcat-7.0.77\wtpwebapps\book\WEB-INF\classes\mapper\BookDao.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 'com.huike.bean.Book'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.huike.bean.Bookrn报错找不到实体类Book,我这有book啊,什么鬼
ssm 修改报错
Could not complete requestrnjava.lang.NumberFormatException: nullrn at java.lang.Integer.parseInt(Integer.java:415)rn at java.lang.Integer.parseInt(Integer.java:497)rn at com.bangshuo.kuaigong.controller.EmployeeUserController.updateByPrimaryKey(EmployeeUserController.java:168)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)rn at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)rn at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:746)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:687)rn at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)rn at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:822)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rn2017-8-3 8:55:36 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet springmvc threw exceptionrnjava.lang.NumberFormatException: nullrn at java.lang.Integer.parseInt(Integer.java:415)rn at java.lang.Integer.parseInt(Integer.java:497)rn at com.bangshuo.kuaigong.controller.EmployeeUserController.updateByPrimaryKey(EmployeeUserController.java:168)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)rn at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)rn at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:746)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:687)rn at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)rn at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:822)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rn
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法

相似问题

5
maven 运行项目 404 求大佬指教啊 百度了很多 都不行
2
ssm框架连接配置applicationContext.xml运行时报错
2
SSM配置applicationContext.xml中mybatis的bean出现问题
2
大神帮下忙,启动service项目时候报错,然后根据路径带编译后的xml查看,很多地方都变成了红色,编译前没问题
4
SSM框架中,怎么通过controller实现页面的跳转?
1
SSM Dubbo 集成 Shiro 自定义Realm 注入 SysUserMapper 失败
1
@autowired注入mapper为null
2
一开始自己配置的activiti的运行web时报错以为是环境的问题,后面到网上借鉴改了一些还是没用。
1
ssm开发过程中,tomcat启动失败,target\classes\spring-mvc.xml和spring-mybatis.xml报红
4
ssm框架运行时spring-mybatis配置文件报bean的错
2
apringtask项目使用ssm框架但是并没有使用到mvc项目运行后报很多错 是配置文件有问题嚒
0
SSM项目pom.xml引用jar包爆红 kaptcha.wso2 就是他
1
一个ssm项目只给了映射文件,需要我创建数据库,但是有些问题,
6
求助,ssm框架insert语句接收不到pojo类的数据什么问题
2
SSM整合运行Tomcat报错org.springframework.beans.factory.BeanCreationException
3
SSM框架jsp到controller跳转不了,请问哪里错了?
3
maven集成SSM,提示Failed to load ApplicationContext
2
使用ssm出现java.lang.ClassNotFoundException: ${jdbc.driver}异常,求各位大神看一下
2
关于SSM的配置,新手有很多不懂的地方
2
MavenWeb项目使用mybatis的分页查询插件,在项目部署时出现错误