gpt4 book ai didi

java - 调试时自动重新加载类

转载 作者:行者123 更新时间:2023-12-02 10:42:41 25 4
gpt4 key购买 nike

我目前正在开发大型 Spring Boot 项目,该项目大约需要 1 分钟才能启动。在调试时,如果我在某些类中进行了一些更改,我必须再次重新启动整个应用程序。

有什么方法可以让我只重新加载那些在调试 Intellij 时已更新的类(和 beans),以便我可以快速看到正在运行的应用程序中的这些更改?

最佳答案

是的,你可以,

正如 Intellij Idea 所说:

Reloading changed classes To reload changed classes

Do one of the following:

On the main menu, choose Run | Reload Changed Classes.

On the main menu, choose Build | Compile "class_name" to recompile an altered class during debug.

In the Reload Changed Classes dialog box, confirm reloading. Results are displayed in the Messages tool window.

Configuring reloading behavior To configure reloading behavior

On the main menu, choose File | Settings, and under Build, Execution, Deployment expand the Debugger node.

Open HotSwap page.

Click one of the radio buttons in the group Reload classes after compilation. You can opt to always reload classes, reload afterconfirmation, or never do it.

引用 https://www.jetbrains.com/help/idea/2017.3/reloading-classes.html

关于java - 调试时自动重新加载类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52814142/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com