Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring plugin doesn't work with @Lookup annotation #458

Open
mkamalov opened this issue Mar 6, 2023 · 2 comments
Open

Spring plugin doesn't work with @Lookup annotation #458

mkamalov opened this issue Mar 6, 2023 · 2 comments
Labels

Comments

@mkamalov
Copy link

mkamalov commented Mar 6, 2023

Problem1:
Spring supports registering abstract class with at least one method marked with annotation @lookup
In this case application doesn't launch if hotswap-agent is enabled.
An example: commit in opensource project

Problem2:
After replacing abstract class with regular class the application starts, but @lookup marked method doesn't work properly and returns null value. Seems, hotswap-agent doesn't wrap the class with right wrapper for class.

All problems are related to @lookup annotation. This is annotation is very popular and must work if Spring plugin is enabled.

@skybber skybber added the bug label Apr 3, 2023
@skybber
Copy link
Contributor

skybber commented Apr 6, 2023

I can not reproduce problem in unit test using @Lookup. Could you please attach the logs if you see a problem in them?

@skybber
Copy link
Contributor

skybber commented Apr 6, 2023

It seems that problem is caused by setCacheBeanMetadata(false); at https://github.com/HotswapProjects/HotswapAgent/blob/master/plugin/hotswap-agent-spring-plugin/src/main/java/org/hotswap/agent/plugin/spring/SpringPlugin.java#L242 , I'm not good enough expert on spring plugin to fix & test it on real life project. It seems that at least unit tests passes without this line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants