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

When 'spring-boot-devtools' is introduced in the project, the extensions are not available. #77

Open
octoape opened this issue Jul 2, 2023 · 6 comments

Comments

@octoape
Copy link

octoape commented Jul 2, 2023

Hello @decebals

When 'spring-boot-devtools' is introduced in the project, the extensions are not available. If I remove 'spring-boot-devtools', I can get the extensions normally. Is there a way to solve this problem? 'spring-boot-devtools' is very useful when developing, so I can't just delete 'spring-boot-devtools'.

Thanks.

@decebals
Copy link
Member

decebals commented Jul 5, 2023

I don't know what to say about this problem. I don't use spring-boot in my projects. Try to investigate/debug the problem.

@decebals
Copy link
Member

For SpringBoot and PF4J integration please take a look on https://github.com/hank-cp/sbp.

@decebals
Copy link
Member

From what I see in the Spring DevTools reference page, it's a caution related to this aspect.

Devtools might cause classloading issues, in particular in multi-module projects. Diagnosing Classloading Issues explains how to diagnose and solve them.

@decebals
Copy link
Member

First step is to try to follow some recommendations described in the Diagnosing Classloading Issues section.

@grimsi
Copy link

grimsi commented Oct 29, 2024

I was able to get it working with Spring Devtools restart functionality enabled thanks to @stefv from StackOverflow: https://stackoverflow.com/questions/73654174/my-application-cant-find-the-extension-with-pf4j

See this commit: gameyfin/gameyfin@0563f2b

TL;DR: I extended the PluginManager with a custom PluginLoader which gets its ClassLoader injected from the Spring Context.
Maybe this can be included in PF4J-Spring out of the box? Seems like a fairly common case that Devtools are used when Spring (Boot) is used.

@decebals
Copy link
Member

Maybe this can be included in PF4J-Spring out of the box? Seems like a fairly common case that Devtools are used when Spring (Boot) is used.

You can create a PR.

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

No branches or pull requests

3 participants