When using resttemplate, there is no error in microservices, just a longer execution time
2018-05-03 16:57:02.916 Info 14456---[o-10002-exec-11] com.dd.action.BreakDownAction:-->>> Delete Information
2018-05-03 16:57:08.773 INFO 14456---[o-10002-exec-11] com.dd.SqlMonitorInterceptor: [com .... Impl] Execution Time: 5857 MS (ms).
2018-05-03 16:57:08.773 INFO 14456---[o-10002-exec-11] com.dd.action.BreakDownAction:-->>> deleted results: 1
However, the client directly returns an error:
org.springframework.web.client.httpservererrorexception:500NULLAt Org.springframework.web.client.DefaultResponseErrorHandler.handleError (Defaultresponseerrorhandler.java: 66) at Org.springframework.web.client.RestTemplate.handleResponse (Resttemplate.java:700) at Org.springframework.web.client.RestTemplate.doExecute (Resttemplate.java:653) at Org.springframework.web.client.RestTemplate.execute (Resttemplate.java:613) at Org.springframework.web.client.RestTemplate.postForObject (Resttemplate.java:380) at Com.dd.util.RestTemplateUtil.post (Resttemplateutil.java:43) at Com.dd.serviceimpl.roadbill.RoadBillBreakDownServiceImpl.del (Roadbillbreakdownserviceimpl.java:29) at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (Nativemethodaccessorimpl.java:62) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke (Method.java:483) at Org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection (Aoputils.java:333) at Org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint ( Reflectivemethodinvocation.java:190) at Org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (Reflectivemethodinvocation.java: 157) at Org.springframework.aop.aspectj.AspectJAfterAdvice.invoke (Aspectjafteradvice.java:47) at Org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (Reflectivemethodinvocation.java: 179) at Org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke (Exposeinvocationinterceptor.java :92) at Org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (Reflectivemethodinvocation.java: 179) at Org.springframework.aop.framework.JdkDynamicAopProxy.invoke (Jdkdynamicaopproxy.java:213) at Com.sun.proxy. $Proxy 31.del (Unknown Source) at Com.dd.action.roadbill.RoadBillBreakDownAction.del (roadbillb Reakdownaction.java:51) at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (Nativemethodaccessorimpl.java:62) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke (Method.java:483) at Org.springframework.web.method.support.InvocableHandlerMethod.doInvoke (Invocablehandlermethod.java: 205) at Org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest ( Invocablehandlermethod.java:133) at Org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle ( Servletinvocablehandlermethod.java:97) at Org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod ( Requestmappinghandleradapter.java:827) at Org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal ( Requestmappinghandleradapter.java:738) at Org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle ( Abstracthandlermethodadapter.java:85) at Org.springframework.web.servlet.DispatcherServlet.doDispatch (Dispatcherservlet.java:967) at Org.springframework.web.servlet.DispatcherServlet.doService (Dispatcherservlet.java:901) at Org.springframework.web.servlet.FrameworkServlet.processRequest (Frameworkservlet.java:970) at Org.springframework.web.servlet.FrameworkServlet.doPost (Frameworkservlet.java:872) at Javax.servlet.http.HttpServlet.service (Httpservlet.java:661) at Org.springframework.web.servlet.FrameworkServlet.service (Frameworkservlet.java:846) at Javax.servlet.http.HttpServlet.service (Httpservlet.java:742) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:231) at Org.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:166) at Org.apache.tomcat.websocket.server.WsFilter.doFilter (Wsfilter.java:52) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:193) at Org.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:166) at Com.dd.util.AuthoritionFilter.doFilter (Authoritionfilter.java:37) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:193) at Org.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:166) at Org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal (Characterencodingfilter.java: 197) at Org.springframework.web.filter.OncePerRequestFilter.doFilter (Onceperrequestfilter.java:107) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:193) at Org.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:166) at Org.apache.catalina.core.StandardWrapperValve.invoke (Standardwrappervalve.java:198) at Org.apache.catalina.core.StandardContextValve.invoke (Standardcontextvalve.java:96) at Org.apache.catalina.authenticator.AuthenticatorBase.invoke (Authenticatorbase.java:478) at Org.apache.catalina.core.StandardHostValve.invoke (Standardhostvalve.java:140) at Org.apache.catalina.valves.ErrorReportValve.invoke (Errorreportvalve.java:80) at Org.apache.catalina.valves.AbstractAccessLogValve.invoke (Abstractaccesslogvalve.java:650) at Org.apache.catalina.core.StandardEngineValve.invoke (Standardenginevalve.java:87) at Org.apache.catalina.connector.CoyoteAdapter.service (Coyoteadapter.java:342) at Org.apache.coyote.http11.Http11Processor.service (Http11processor.java:799) at Org.apache.coyote.AbstractProcessorLight.process (Abstractprocessorlight.java:66) at Org.apache.coyote.abstractprotocol$connectionhandler.process (Abstractprotocol.java:868) at Org.apache.tomcat.util.net.nioendpoint$socketprocessor.dorun (Nioendpoint.java:1457) at Org.apache.tomcat.util.net.SocketProcessorBase.run (Socketprocessorbase.java:49) at Java.util.concurrent.ThreadPoolExecutor.runWorker (Threadpoolexecutor.java:1142) at Java.util.concurrent.threadpoolexecutor$worker.run (Threadpoolexecutor.java:617) at Org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run (Taskthread.java:61) at Java.lang.Thread.run (Thread.java:745)
But found that if the execution time is short, there will be no abnormal appearance,
2018-05-03 17:04:23.051 Info 14456---[o-10002-exec-11] com.dd.action.RoadBreakDownAction:-->>> Delete Anchor information
2018-05-03 17:04:23.423 INFO 14456---[o-10002-exec-11] com.dd.SqlMonitorInterceptor: [ Com.dd.serviceimpl.RoadBillBreakDownServiceImpl.del_info] Execution Time: 372 ms (ms).
2018-05-03 17:04:23.423 INFO 14456---[o-10002-exec-11] com.dd.action.RoadBreakDownAction:-->>> deleted results: 1
org.springframework.web.client.httpservererrorexception:500 NULL