Plugin System in Spring Boot for modular applications -
i looking dynamically loading jar in spring boot after compiling, example put jars in folder , when spring boot started, jars folder injected spring boot app. don't know how can spring boot, , if know can me this, example.
i need jars have @service, @controller module (plugin), adding capabilities spring boot app.
is possible spring boot, , if possible, please provide me sample code.
thanks in advance.
update: found https://www.youtube.com/watch?v=f-sw2pfdcdw https://code.google.com/p/jspf/
update 2: can't @controller bean plugin jar registered in spring boot
one option use broad @componentscan. if add new jar classpath annotated classes jar discovered via @componentscan, @controllers mapped etc.
the xml equivalent here placing xml configuration files somewhere classpath (meta-inf folder being obvious choice) , import them using wildcard. idea same. if plugin jar file on classpath xml file imported , beans (controllers, ...) loaded.
there drawbacks approach modules not being isolated option simpler applications.
Comments
Post a Comment