Code Monkey home page Code Monkey logo

pf4j-spring-tutorial's People

Contributors

ralemy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pf4j-spring-tutorial's Issues

spring-plugin-container use spring-boot-starter-web

Hi,
I am trying to build spring-plugin-container with spring-boot-starter-web instead of spring-boot-starter-webflux. But I don't know how to process below code in PluginConfig.java. Can you teach me how to handle pluginEndPoints if I only use starter-web.

Best

@Bean
@DependsOn("pluginManager")
public RouterFunction<?> pluginEndpoints(PluginManager pm) {
    registerMvcEndpoints(pm);
    return getReactiveRoutes(pm);
}

Support for Gradle

Hi @ralemy,

Its a great tutorial, can you please confirm if we can use Gradle as package/build tool.

It would be great if you can you post sample configurations for the same?

Thanks!!!

Disable Plugin is not working

I have created a disabled.txt file in the plugins folder and added plugin-id to disable. Its shows me in disable list but is resolved and I am able to access plugin feature.

**pf4j-spring_0.5.0.jar**

c.q.s.SpringcontainerApplication : Starting SpringcontainerApplication on Qrz-Mohan with PID 10596
c.q.s.SpringcontainerApplication : No active profile set, falling back to default profiles: default
org.pf4j.DefaultPluginStatusProvider : Enabled plugins: []
org.pf4j.DefaultPluginStatusProvider : Disabled plugins: [spring-plugin]
org.pf4j.DefaultPluginManager : PF4J version 2.3.0 in 'deployment' mode
org.pf4j.CompoundPluginDescriptorFinder : C:\plugins\springplugin-1.0.0.jar
org.pf4j.AbstractPluginManager : Plugin 'plugins\springplugin-1.0.0.jar' is disabled
org.pf4j.AbstractPluginManager : Plugin '[email protected]' resolved
org.pf4j.AbstractPluginManager : Start plugin '[email protected]'
Spring Sample plugin.start()
o.s.b.web.embedded.netty.NettyWebServer : Netty started on port(s): 9090
c.q.s.SpringcontainerApplication : Started SpringcontainerApplication in 4.557 seconds (JVM running for 6.795)
Number of plugins found: 1

Dependency is fails to load in Plugin Application

Successfully we can load external Spring Boot JAR as a plugin in the main Spring Boot application. But plugin jar its fails to load its dependency (not able to load dependency(external Jar here I am using simple-json of plugin application). Deployment as JAR plugin.

Also added dependency in assambly.xml file

           <includes>
                <include>org.pf4j:*</include>
                <include>com.googlecode.json-simple:*</include>
            </includes>

java.lang.NoClassDefFoundError: org/json/simple/JSONObject
at com.qruizemagic.springplugin.PluginController.greetMVC(PluginController.java:22) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_91]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_91]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_91]
at org.springframework.web.reactive.result.method.InvocableHandlerMethod.lambda$invoke$0(InvocableHandlerMethod.java:139) ~[spring-webflux-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]

Application Properties in spring plugin

Was trying to use the properties injection in one of plugins and the properties are not resolved. Is there a way to propagate the properties from the app to plugin?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.