From ad9ea8d98e8ac9ea3d884783dbc5f2d228171eee Mon Sep 17 00:00:00 2001 From: qibaoguang Date: Sun, 12 Apr 2015 13:46:37 +0800 Subject: [PATCH] Update 72.6. Reload Java classes without restarting the container.md --- ...72.6. Reload Java classes without restarting the container.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/IX. ‘How-to’ guides/72.6. Reload Java classes without restarting the container.md b/IX. ‘How-to’ guides/72.6. Reload Java classes without restarting the container.md index e69de29..eadf01e 100644 --- a/IX. ‘How-to’ guides/72.6. Reload Java classes without restarting the container.md +++ b/IX. ‘How-to’ guides/72.6. Reload Java classes without restarting the container.md @@ -0,0 +1,5 @@ +### 72.6. 在不重启容器的情况下重新加载Java类 + +现代IDEs(Eclipse, IDEA等)都支持字节码的热交换,所以如果你做了一个没有影响类或方法签名的改变,它会利索地重新加载并没有任何影响。 + +[Spring Loaded](https://github.com/spring-projects/spring-loaded)在这方面走的更远,它能够重新加载方法签名改变的类定义。如果对它进行一些自定义配置可以强制ApplicationContext刷新自己(但没有通用的机制来确保这对一个运行中的应用总是安全的,所以它可能只是一个开发时间的技巧)。