pf4j-spring icon indicating copy to clipboard operation
pf4j-spring copied to clipboard

An error is reported when running a plugin in a Spring Boot project and introducing additional Spring dependencies into the plugin

Open Aboudkingto opened this issue 1 year ago • 0 comments

I'm using a SpringBoot main project, introducing Spring Security dependencies into my plugin project, I package it into the jar when packing, and use the plugin in the main project, but running SpringBoot gives an error, the following is the error content. java.lang.LinkageError: loader constraint violation for class org.stardye.plugins.devise.security.SercurityPlugin: when selecting overriding method 'org.springframework.context.ApplicationContext org.stardye.plugins.devise.security.SercurityPlugin.createApplicationContext()' the class loader org.pf4j.PluginClassLoader @73844119 of the selected method's type org.stardye.plugins.devise.security.SercurityPlugin, and the class loader 'app' for its super type org.pf4j.spring.SpringPlugin have different Class objects for the type org.springframework.context.ApplicationContext used in the signature (org.stardye.plugins.devise.security.SercurityPlugin is in unnamed module of loader org.pf4j.PluginClassLoader @73844119, parent loader 'app'; org.pf4j.spring.SpringPlugin is in unnamed module of loader 'app')

Aboudkingto avatar Nov 23 '24 16:11 Aboudkingto