I have a jar file which acts like a plugin. In my main application I use component scan to inject the classes present in the jar file placed on the classpath. This is working fine in springboot however I am looking for a way to do the same thing on Jboss server but the classpath approach does not work in jboss as it loads 3rd party jar through modules. I have tried adding this jar both as a static module and dynamic module but my main app is unable to scan the classes inside the jar file. I'm not getting any module loading errors so it looks like the jar is getting loaded as a module but I'm not sure what could be the reason for spring component scan to not be working.
Let me know if I need to add more info to the question.