springMvc+mybtis事务问题,求大佬帮忙

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/lichaostart/article/details/81165041

今天给项目配置事务管理,因为是项目做的差不多了才想到加事务的,所以出了好多问题,自己又是新手,弄了一上午没有达到想要的效果,还请各位大佬指点一下

applicatgion.xml配置如下

spring-servlet配置

事务管理器配置:

操作的方法:

请大神帮我瞅瞅,哪里出了问题

展开阅读全文

大佬帮忙看看

11-16

错误信息:rnClientAbortException: java.net.SocketException: Software caused connection abort: socket write errorrn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)rn at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)rn at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)rn at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)rn at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)rn at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)rn at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)rn at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:135)rn at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220)rn at java.io.Writer.write(Writer.java:157)rn at org.springframework.util.StreamUtils.copy(StreamUtils.java:118)rn at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:106)rn at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:41)rn at org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:227)rn at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:247)rn at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:174)rn at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:81)rn at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:113)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)rn at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)rn at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)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:197)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:745)rnCaused by: java.net.SocketException: Software caused connection abort: socket write errorrn at java.net.SocketOutputStream.socketWrite0(Native Method)rn at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)rn at java.net.SocketOutputStream.write(SocketOutputStream.java:155)rn at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764)rn at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)rn at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:570)rn at org.apache.coyote.Response.doWrite(Response.java:560)rn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)rn ... 45 morern十一月 16, 2017 4:29:10 下午 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet MVC DispatcherServlet threw exceptionrnjava.lang.NullPointerExceptionrn at com.zhwy.exception.MyExceptionHandler.resolveException(MyExceptionHandler.java:54)rn at org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:1222)rn at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1034)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:984)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)rn at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)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:197)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:745)rn 论坛

没有更多推荐了,返回首页