Skip to content

flexicore-boot-starter-web handles REST plugin loading for spring-boot-starter-web

License

Notifications You must be signed in to change notification settings

wizzdi/flexicore-boot-starter-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlexiCore Boot Starter Web Build StatusMaven Central

For comprehensive information about FlexiCore Boot Starter Web please visit our site.

What it does?

FlexiCore Boot Starter Web is a FlexiCore Module that enables Spring's RestController inside FlexiCore Plugins.

How to use?

Add the flexicore-boot-starter-web dependency using the latest version available from maven central:

	<dependency>
            <groupId>com.wizzdi</groupId>
            <artifactId>flexicore-boot-starter-web</artifactId>
            <version>LATEST</version>
        </dependency>

Simply annotate your application class or your configuration class with

@EnableFlexiCoreRESTPlugins

Example

your application class:

@EnableFlexiCorePlugins  
@EnableFlexiCoreRESTPlugins
@SpringBootApplication  
public class App {  
  
   public static void main(String[] args) {  
  
      SpringApplication app = new SpringApplication(App.class);  
  app.addListeners(new ApplicationPidFileWriter());  
  ConfigurableApplicationContext context=app.run(args);  
  
  }
}

a RestController inside a plugin:

@Extension  
@RestController  
public class PluginAService implements Plugin {  
  
   @GetMapping("/test")  
   public String createTestEntity(@RequestParam(name="name", required=false, defaultValue="Stranger") String name) {  
      return "hello "+name;  
  }  
  
  
}

Configuration

FlexiCore Boot Starter Web exposes the following configuration options:

name default value description
flexicore.externalStatic /home/flexicore/ui/ location of ui
flexicore.externalStaticMapping /** mapping of ui
flexicore.internalStaticLocation classpath:/static/ location of internally provided ui
flexicore.internalStaticMapping /FlexiCore/** mapping of internally provided ui

Main Dependencies

FlexiCore Boot

Spring Boot Starter Web

About

flexicore-boot-starter-web handles REST plugin loading for spring-boot-starter-web

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages