0

I have an environment where I have a java(spring mvc) webapp being developed by an n-member team on intellij with gradle as the build agent. This project has a dependency that is also being developed by the same team. The dependency is published to a repository from where it is read by the spring mvc app. What happens is that everytime there is a change to the dependency code, the spring app code has to be refreshed to include the latest version of the dependency code. So, the question is that is there a way to do a code swap at runtime in the dependency code and have it take affect in a debug session, pretty much like what JRebel does except that it needs to do it in the dependency code.

Any views on this would be highly appreciated.

P.S- I tagged gradle and jrebel because there might be a way to achieve this via this tech stack.

4

1 回答 1

1

JRebel 可以监控 jars,尽管它的效率不是很高。在 rebel.xml 配置文件中,您可以指定一个<jar>标记指向文件系统中依赖项的位置。

更好的方法是实际使用源代码,以便您使用指向已编译类所在位置的rebel.xml部署依赖项,然后像使用源代码一样使用依赖项,当需要并编译更改。如果您的编译器是增量的,那么它将只编译更改的类,而 JRebel 不必一次重新加载太多的类,而只需重新加载更改。

于 2014-06-19T19:23:22.580 回答