How to start aspectj loadtime weaver agent without restarting jvm / how to start loadtime weaver in code?

删除回忆录丶 提交于 2019-12-25 00:18:53

问题


Is there any way to start the AspectJ loadtime weaver during the application is running? Means without restarting the JVM and adding -javaagent:... ?

I tried https://stackoverflow.com/a/35775792/3880225 but without any success.


回答1:


Yes, you can do that, I implemented this capability myself for AspectJ and it was included since version 1.8.7, see release notes for an example.

But please note that weaving will only work for classes loaded after you have activated the weaver.



来源:https://stackoverflow.com/questions/48678557/how-to-start-aspectj-loadtime-weaver-agent-without-restarting-jvm-how-to-start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!