disconf 主要分为三个项目:
1-disconf.core 主要是提供助手类http的resful 重试等等,zk wather封装,加强了重试机制,做的东西很薄。
2-disconf.client 强依赖 spring,提供了 扫包,自定义annotation的解析装配,切面逻辑处理aspectj,获取远端配置,并落地 做的东西比较多 依赖也很多。
3-disconf.web 是后台管理的web应用,spring mvc restful api实现,前后端分离的开发模式,提供登录,后台管理的功能,业务的东西多一点,可能因为开源的原因,好多有些小功能上的bug,并没有提供权限管理的功能。
问题:private Map<String, DisconfCenterFile> confFileMap = new HashMap<String, DisconfCenterFile>();
内部实现是一个hashMap
"main" prio=5 tid=0x00007fa423805800 nid=0x1703 runnable [0x0000700000219000]
java.lang.Thread.State: RUNNABLE
at java.util.HashMap.addEntry(HashMap.java:884)
at java.util.HashMap.put(HashMap.java:505)
at com.baidu.disconf.client.common.model.DisconfCenterFile.getKV(DisconfCenterFile.java:134)
at com.baidu.disconf.client.usertools.impl.DisconfDataGetterDefaultImpl.getByFile(DisconfDataGetterDefaultImpl.java:28)
at com.baidu.disconf.client.usertools.DisconfDataGetter.getByFile(DisconfDataGetter.java:22)
at com.example.disconf.demo.task.DisconfDemoTask$1.run(DisconfDemoTask.java:80)
at java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:2025)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372)
at com.example.disconf.demo.task.DisconfDemoTask.run(DisconfDemoTask.java:77)
at com.example.disconf.demo.DisconfDemoMain.main(DisconfDemoMain.java:36)
aspctj
"main" prio=5 tid=0x00007fd6ac007000 nid=0x1703 runnable [0x0000700000219000]
java.lang.Thread.State: RUNNABLE
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotationFromMember(Java15AnnotationFinder.java:100)
at org.aspectj.weaver.reflect.ReflectionVar.getBindingAtJoinPoint(ReflectionVar.java:162)
at org.aspectj.weaver.reflect.ShadowMatchImpl.getPointcutParameters(ShadowMatchImpl.java:108)
at org.aspectj.weaver.reflect.ShadowMatchImpl.matchesJoinPoint(ShadowMatchImpl.java:88)
at org.springframework.aop.aspectj.AspectJExpressionPointcut.matches(AspectJExpressionPointcut.java:336)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:167)
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.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
at com.example.disconf.demo.config.CodeConfig$$EnhancerBySpringCGLIB$$2495de40.getCodeError(<generated>)
at com.example.disconf.demo.task.DisconfDemoTask.run(DisconfDemoTask.java:71)
at com.example.disconf.demo.DisconfDemoMain.main(DisconfDemoMain.java:36)
java.lang.Thread.State: RUNNABLE
at sun.reflect.Reflection.getCallerClass(Native Method)
at java.lang.Class.getDeclaredFields(Class.java:1810)
at com.baidu.disconf.client.store.aspect.DisconfAspectJ.decideAccess(DisconfAspectJ.java:60)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
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.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
at com.example.disconf.demo.config.JedisConfig$$EnhancerBySpringCGLIB$$ce8fc02a.getPort(<generated>)
at com.example.disconf.demo.task.DisconfDemoTask.run(DisconfDemoTask.java:70)
at com.example.disconf.demo.DisconfDemoMain.main(DisconfDemoMain.java:36)
DISCCONF本身代码写的很糟糕,使用过程中经常的发生问题,不推荐使用。
分享到:
相关推荐
jmesa源码解读 共五部分 jmesa源码解读一[包结构] jmesa源码解读二[limit包] jmesa源码解读三[core包] jmesa源码解读四[core.filter包] jmesa源码解读五[view包]
acegi源码解读.txtacegi源码解读.txtacegi源码解读.txt
4500页的源码解读 光是SELECT语句相关实现,就阐述了300多页 看完了你就是postgreSQL达人了 章节明细,需要精读那个功能点就仔细看
jQuery源码解读,jQuery源码解读
Vue进阶面试题,源码解读,含Vue3源码解读 Vue进阶面试题,源码解读,含Vue3源码解读 Vue进阶面试题,源码解读,含Vue3源码解读 Vue进阶面试题,源码解读,含Vue3源码解读
spring源码解读
netty5.0架构剖析和源码解读, 很清楚的讲解了netty5.0的架构和源码
TMS320F28x源码解读,包含DSP281x_common,DSP281x_headers,DSP281x_examples,DOC,四部分
Netty5.0架构剖析和源码解读.pdf是一本比较全的讲解netty5的书籍,任何对java的nio技术感兴趣的人都值得一看。
Netty5.0架构剖析和源码解读,学习NIO,学习netty,值得学习
CMS源码解读
HashMap之resize()方法源码解读,分两部分概述扩容方法涉及到的处理:创建新数组,将旧数组元素转移到新数组上
Netty5.0架构和源码解读分析,学习netty java nio框架的好书。
SpringIOC源码解说,以及对应的代码解读。
floodlight源码解读
新星计划 Vue进阶面试题,源码解读,含Vue3源码解读.
Spark源码解读迷你 RDD、Spark Submit、Job、Runtime、Scheduler、Spark Storage、Shuffle、Standlone算法、Spark On yarn。。。
Netty5.0架构剖析和源码解读 目录 1. 概述 2. NIO 入门 3. Netty 源码分析 4. Netty 架构 5. 附录
Netty5.0架构剖析和源码解读 李林峰 可编辑文字版.pdf