Giter VIP home page Giter VIP logo

Comments (5)

dongweizhao avatar dongweizhao commented on June 11, 2024

版本 6.8.0

from discovery.

HaojunRen avatar HaojunRen commented on June 11, 2024

你提供的方案治标不治本,你红框内标识的对象是Spring内置对象为空,应该研究一下,为何这个对象为空?否则就算加了非空判断,依旧拿不到这个对象,还是会影响逻辑的

from discovery.

HaojunRen avatar HaojunRen commented on June 11, 2024

我观察你的截图,有两重异步,Kafaka和Hystrix,Spring内核的Threadlocal应该是Kafka层面弄丢的,建议试试DiscoveryAgent,同时不需要引入Hystrix增强包

from discovery.

dongweizhao avatar dongweizhao commented on June 11, 2024

我看了spring的源码的RequestContextHolder的requestAttributesHolder和inheritableRequestAttributesHolder的值是通过FrameworkServlet中接收到web请求把请求属性注入进去的,而我们的场景是通过kafka或者定时任务发起的服务调用,所以不会走FrameworkServlet类,因此才会出现上面的问题,所以在DefaultServiceStrategyCallableWrapper的wrapCallable方法中应该判断一下!

from discovery.

HaojunRen avatar HaojunRen commented on June 11, 2024

OK。比较遗憾,6.12.0昨天行发版,我可以加上这段代码,但下个版本需要到至少2个月后了,请自行修改一下源码吧

from discovery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.