V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
x2024

看 Spring boot 源码是学到一招

  •  
  •   x2024 · Sep 5, 2025 · 1660 views
    This topic created in 241 days ago, the information mentioned may be changed or developed.
    1. 断点到某个方法,想看下是从来哪里调用来的;
    2. 知道会调用的这个方法,但是不知道谁调用的;

    new RuntimeException().printStackTrace();

    可以直接打印堆栈信息。

    3 replies    2025-09-06 16:27:47 +08:00
    joeyFuck
        1
    joeyFuck  
       Sep 5, 2025
    6 ,我都是通过 getClass()来看
    micean
        2
    micean  
       Sep 5, 2025
    debug 都有实时线程栈信息看的,在界面上找一找,不用打印
    jamesjammy061
        3
    jamesjammy061  
       Sep 6, 2025
    断电不好么
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2688 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 93ms · UTC 03:31 · PVG 11:31 · LAX 20:31 · JFK 23:31
    ♥ Do have faith in what you're doing.