【dubbo】http.conn.HttpHostConnectException.host: 'org.apache.http.HttpHost' could not be instantiated

大家好,我是烤鸭:

   dubbo遇到如下问题。

 

 1.   异常详细信息:

   某个异常对象无法实例化。

com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method: updateCardBycustomerNum, provider: dubbo://20.x.xx.48:20883/com.etc.service.bank.EtcBankcardInfoService?anyhost=true&application=etc_manage_web&check=false&default.timeout=600000&dubbo=2.6.2&generic=false&interface=com.etc.service.bank.EtcBankcardInfoService&methods=protocolBindCardSupplement,queryAlipayBinds,update,insert,updateCardBycustomerNum,bindAlipay,getUserByCustomerNum,selectListByObject,validateBindCard,updateDefault,selectBycustomerNum,validateBindCardSupplement,protocolBindCard,selectOneByObject,selectBycustomerNumBackend&pid=2539&register.ip=10.xx.xx.47&remote.timestamp=1561084612315&revision=1.0-SNAPSHOT&side=consumer&timestamp=1561101150616, cause: com.alibaba.com.caucho.hessian.io.HessianFieldException: org.apache.http.conn.HttpHostConnectException.host: 'org.apache.http.HttpHost' could not be instantiated
com.alibaba.com.caucho.hessian.io.HessianFieldException: org.apache.http.conn.HttpHostConnectException.host: 'org.apache.http.HttpHost' could not be instantiatedat com.alibaba.com.caucho.hessian.io.JavaDeserializer.logDeserializeError(JavaDeserializer.java:167)at com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(JavaDeserializer.java:412)at com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:276)at com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:203)at com.alibaba.com.caucho.hessian.io.SerializerFactory.readObject(SerializerFactory.java:526)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObjectInstance(Hessian2Input.java:2810)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2750)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2279)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2724)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2279)at com.alibaba.dubbo.common.serialize.hessian2.Hessian2ObjectInput.readObject(Hessian2ObjectInput.java:84)at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:92)at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:113)at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.decodeBody(DubboCodec.java:89)at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:124)at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:84)at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.decode(DubboCountCodec.java:46)at com.alibaba.dubbo.remoting.transport.netty.NettyCodecAdapter$InternalDecoder.messageReceived(NettyCodecAdapter.java:133)at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)
Caused by: com.alibaba.com.caucho.hessian.io.HessianProtocolException: 'org.apache.http.HttpHost' could not be instantiatedat com.alibaba.com.caucho.hessian.io.JavaDeserializer.instantiate(JavaDeserializer.java:316)at com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:201)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObjectInstance(Hessian2Input.java:2808)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2146)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2075)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2119)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2075)at com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(JavaDeserializer.java:408)... 29 more
Caused by: java.lang.reflect.InvocationTargetExceptionat sun.reflect.GeneratedConstructorAccessor90.newInstance(Unknown Source)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:423)at com.alibaba.com.caucho.hessian.io.JavaDeserializer.instantiate(JavaDeserializer.java:312)... 36 more
Caused by: java.lang.IllegalArgumentException: Host name may not be nullat org.apache.http.util.Args.containsNoBlanks(Args.java:81)at org.apache.http.HttpHost.<init>(HttpHost.java:80)at org.apache.http.HttpHost.<init>(HttpHost.java:135)... 40 moreat com.alibaba.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:100)at com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:148)at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75)at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)at com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:54)at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)at com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:48)at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72)at com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:77)at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:78)at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:238)at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:75)at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52)at com.alibaba.dubbo.common.bytecode.proxy5.updateCardBycustomerNum(proxy5.java)at com.etc.controller.bank.EtcBankcardInfoController.findUserCard(EtcBankcardInfoController.java:334)at sun.reflect.GeneratedMethodAccessor301.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at com.etc.controller.util.InvokeController.invoke(InvokeController.java:88)at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891)at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)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 org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)at com.etc.filter.CookieFilter.doFilter(CookieFilter.java:30)at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)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.CorsFilter.doFilterInternal(CorsFilter.java:96)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.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)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.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)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.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)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:493)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)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:800)at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)at java.lang.Thread.run(Thread.java:748)
Caused by: com.alibaba.dubbo.remoting.RemotingException: com.alibaba.com.caucho.hessian.io.HessianFieldException: org.apache.http.conn.HttpHostConnectException.host: 'org.apache.http.HttpHost' could not be instantiated
com.alibaba.com.caucho.hessian.io.HessianFieldException: org.apache.http.conn.HttpHostConnectException.host: 'org.apache.http.HttpHost' could not be instantiatedat com.alibaba.com.caucho.hessian.io.JavaDeserializer.logDeserializeError(JavaDeserializer.java:167)at com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(JavaDeserializer.java:412)at com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:276)at com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:203)at com.alibaba.com.caucho.hessian.io.SerializerFactory.readObject(SerializerFactory.java:526)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObjectInstance(Hessian2Input.java:2810)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2750)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2279)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2724)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2279)at com.alibaba.dubbo.common.serialize.hessian2.Hessian2ObjectInput.readObject(Hessian2ObjectInput.java:84)at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:92)at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:113)at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.decodeBody(DubboCodec.java:89)at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:124)at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:84)at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.decode(DubboCountCodec.java:46)at com.alibaba.dubbo.remoting.transport.netty.NettyCodecAdapter$InternalDecoder.messageReceived(NettyCodecAdapter.java:133)at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)
Caused by: com.alibaba.com.caucho.hessian.io.HessianProtocolException: 'org.apache.http.HttpHost' could not be instantiatedat com.alibaba.com.caucho.hessian.io.JavaDeserializer.instantiate(JavaDeserializer.java:316)at com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:201)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObjectInstance(Hessian2Input.java:2808)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2146)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2075)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2119)at com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:2075)at com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(JavaDeserializer.java:408)... 29 more
Caused by: java.lang.reflect.InvocationTargetExceptionat sun.reflect.GeneratedConstructorAccessor90.newInstance(Unknown Source)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:423)at com.alibaba.com.caucho.hessian.io.JavaDeserializer.instantiate(JavaDeserializer.java:312)... 36 more
Caused by: java.lang.IllegalArgumentException: Host name may not be nullat org.apache.http.util.Args.containsNoBlanks(Args.java:81)at org.apache.http.HttpHost.<init>(HttpHost.java:80)at org.apache.http.HttpHost.<init>(HttpHost.java:135)... 40 moreat com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.returnFromResponse(DefaultFuture.java:222)at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:139)at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:112)at com.alibaba.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:95)... 88 more

2.   原因猜想

      猜测可能是内网调用,没有配置hostname 导致的。

     1. 查看机器名

hostname

     2.修改hosts文件 ,如果前面机器名已被映射我们就将其注释掉

vi /etc/hosts
ip hostname
#比如 hostname 为 aaa,ip 为 11.22.33.123
11.22.33.123 aaa

     3. 刷新hosts文件  

source /etc/hosts  

      4.重启网卡

 systemctl restart network   

3.   问题分析

后来又仔细检查一遍日志发现一个问题。我们是采用多个提供者的模式,可能相同的消费者指向了不同的提供者。其实多个提供者也不会有这个问题,分别去 47 和 48 服务器看了,发现两个服务器的 jar包大小不一样,说明两个包的版本不一致

这次出现的问题就是这样了。具体的原因还没有查,如果有类似的问题,可以参考下我这个场景。

如果是自定义的包或者类,可能是没有默认的构造器之类的问题,加上就好了。

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/412790.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

2018 ACM-ICPC青岛现场赛 B题 Kawa Exam 题解 ZOJ 4059

题意&#xff1a;BaoBao正在进行在线考试&#xff08;都是选择题&#xff09;&#xff0c;每个题都有唯一的一个正确答案&#xff0c;但是考试系统有m个bug(就是有m个限制)&#xff0c;每个bug表示为第u个问题和第v个问题你必须选择相同的选项&#xff0c;题目问你&#xff0c;…

[css] 举例说明微信端兼容问题有哪些?

[css] 举例说明微信端兼容问题有哪些&#xff1f; 说一个微信小程序的iPhoneX适配吧&#xff0c; 因为iPhoneX底部没有虚拟按键&#xff0c;底部的横线会出现遮挡这时候就要处理下&#xff1a; 大概思路就是获取到客户端设备&#xff0c;然后判断是iPhoneX就换样式。 在app.js…

多线程创建方式 线程池、Future和CompletableFuture

大家好&#xff0c;我是烤鸭&#xff1a; 今天说一下 多线程的几种创建方式及使用。 1. Thread 和 Runnable 继承 Thread 类 和实现 Runnable 接口。 这种就不举例子了。 2.线程池 现在主要有5种线程池。 //缓存线程池ExecutorService cachedThreadPool Executors.newCa…

[css] 你有没有自己写过一套UI库?说下遇到哪些难点?

[css] 你有没有自己写过一套UI库&#xff1f;说下遇到哪些难点&#xff1f; 维护过&#xff0c;碰到的坑主要是 1&#xff09;同一个UI component在不同地方使用的customization问题。 2&#xff09;还有如果UI component如果有bug的话会导致所有使用的地方都出现bug 3&#x…

权限设计文章汇总

如何设计网站权限系统&#xff1f; https://www.zhihu.com/question/20313385/answer/118095995 我的转载&#xff1a;https://www.cnblogs.com/hao-1234-1234/p/9850967.html 应用程序权限设计 http://www.cnblogs.com/yukaizhao/archive/2007/04/15/user_role_action_permiss…

dubbo 整合 zipkin,最简单的方式,亲测有效

大家好&#xff0c;我是烤鸭。 之前也试过网上很多版本&#xff0c;看了好多文章。现在分享最简单的方式&#xff0c;代码侵入性最小的。 1. 修改pom,引入jar。 <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc --> <dependency><…

[css] 说说你对GPU的理解,举例说明哪些元素能触发GPU硬件加速?

[css] 说说你对GPU的理解&#xff0c;举例说明哪些元素能触发GPU硬件加速&#xff1f; GPU: 图形处理器,用于处理图形有关的任务,用于渲染页面在css中使用 transform: translateZ(0),可以开启GPU硬件加速个人简介 我是歌谣&#xff0c;欢迎和大家一起交流前后端知识。放弃很容…

@Retention 注解的作用

注解Retention可以用来修饰注解&#xff0c;是注解的注解&#xff0c;称为元注解。Retention注解有一个属性value&#xff0c;是RetentionPolicy类型的&#xff0c;Enum RetentionPolicy是一个枚举类型&#xff0c;这个枚举决定了Retention注解应该如何去保持&#xff0c;也可理…

fastjson 1.2 版本之前的bug, 反序列化时自动排序,导致签名不过

大家好&#xff0c;我是烤鸭&#xff1a; 今天分享一个问题&#xff0c;使用fastjson 导致签名不过。 1. 问题复现&#xff1a; fastjson 1.2.4 获取返回值&#xff1a; {"data":[{"id":"120190422110857284042111114","bankAccountTyp…

[css] 你知道CSS中的字母“C“代表什么吗?

[css] 你知道CSS中的字母"C"代表什么吗&#xff1f; CSS(Cascading Style Sheets)。"C" 即为 Cascading 层叠的意思&#xff0c;我们编写 CSS 的时候&#xff0c;写在后面的样式会覆盖前面的样式即层叠。个人简介 我是歌谣&#xff0c;欢迎和大家一起交流…

[Network Architecture]DPN(Dual Path Network)算法详解(转)

https://blog.csdn.net/u014380165/article/details/75676216 论文&#xff1a;Dual Path Networks 论文链接&#xff1a;https://arxiv.org/abs/1707.01629 代码&#xff1a;https://github.com/cypw/DPNs MXNet框架下可训练模型的DPN代码&#xff1a;https://github.com/m…

[css] 怎么自定义鼠标指针的图案?

[css] 怎么自定义鼠标指针的图案&#xff1f; cursor: url() ,auto url是自定义光标图案的绝对路径&#xff0c;auto是默认光标&#xff0c;当我们自定义的光标不起作用时&#xff0c;就用默认光标代替。个人简介 我是歌谣&#xff0c;欢迎和大家一起交流前后端知识。放弃很容…

javax.script.ScriptException: ReferenceError: xxx is not defined in eval

大家好&#xff0c;我是烤鸭&#xff1a; 今天使用 javax.script.ScriptEngine 遇到一个奇怪的问题&#xff0c;无法识别js方法。 1. 报错内容&#xff1a; javax.script.ScriptException: ReferenceError: "a" is not defined in <eval> at line number…

Python的特殊成员

Python 用下划线作为变量前缀和后缀指定特殊变量 _xxx 不能用’from module import *’导入 __xxx__ 系统定义名字 __xxx 类中的私有变量名 核心风格&#xff1a;避免用下划线作为变量名的开始。 现在我们来总结下所有的系统定义属性和方法&#xff0c; 先来看下保留属性&#…

[css] Reset CSS和Normalize CSS的区别是什么?

[css] Reset CSS和Normalize CSS的区别是什么&#xff1f; Reset&#xff1a;将所有浏览器的默认样式都统一化&#xff0c;注重的是跨浏览器统一样式&#xff0c;用户还要自行添加一些默认样式。 Normalize&#xff1a;会根据各个浏览器的不同保留有用的浏览器特色样式&#x…

java 实现 常见排序算法(四)基数排序

大家好&#xff0c;我是烤鸭&#xff1a; 今天分享一下基础排序算法之基数排序。 1. 基数排序&#xff1a; 原理&#xff1a;基数排序&#xff08;radix sort&#xff09;属于“分配式排序”&#xff08;distribution sort&#xff09;&#xff0c;又称“桶子法”&#…

vyos User Guide

vyos User Guide 来源 https://wiki.vyos.net/wiki/User_Guide The VyOS User Guide is focused on providing a general overview of the installation, configuration, and operation of the VyOS network operating system. Introduction VyOS is a Linux-based network ope…

[css] 为什么要使用css sprites?

[css] 为什么要使用css sprites&#xff1f; 减少HTTP请求增加图片显示速度个人简介 我是歌谣&#xff0c;欢迎和大家一起交流前后端知识。放弃很容易&#xff0c; 但坚持一定很酷。欢迎大家一起讨论 主目录 与歌谣一起通关前端面试题

Java 面试题(3)—— JVM

JVM的内存结构。 JVM主要结构&#xff1a;堆内存、栈、方法区&#xff0c;程序计数器&#xff0c;永久代&#xff09;&#xff08;jdk 8采用元空间替代&#xff09;。 堆内存又分成年轻代和年老代。 年轻代由三部分组成&#xff0c;Eden、From Survivor 和 To Survivor&#xf…

[css] 标签、class和id选择器三者的区别是什么?分别在什么时候用?

[css] 标签、class和id选择器三者的区别是什么&#xff1f;分别在什么时候用&#xff1f; 标签选择器&#xff1a;tag{} 选取对应的标签例如 a span div class选择器&#xff1a;.class-name{} 选取对应class-name的元素 id选择器&#xff1a;#id-name{} 选取对应id的元素 其中…