Sign inSign up

wizzdi/flexicore

By wizzdi

•Updated almost 4 years ago

FlexiCore boosts Spring Framework , more info at https://wizzdi.com

Image
0

916

wizzdi/flexicore repository overview

⁠ FlexiCore Build StatusMaven CentralMaven Central

For comprehensive information about FlexiCore please visit our site⁠.

FlexiCore boosts Spring Boot⁠ applications with a very flexible and powerful plugins support, robust access control and an optional set of services many applications require.

⁠Use Case

PersonService in person-service jar

@PluginInfo(version = 1)  
@Extension  
@Component
public class PersonService implements ServicePlugin {  

  private static final Logger logger=LoggerHandler.getLogger(PersonService.class);  
  
 @Autowired  
 @PluginInfo(version = 1)  
  private PersonRepository repository;  
  
  
 public Person createPerson(PersonCreate personCreate, SecurityContext securityContext) {  
        Person person = createPersonNoMerge(personCreate, securityContext);  
  repository.merge(person);  
  return person;  
   }  



public Person createPersonNoMerge(PersonCreate personCreate, SecurityContext securityContext) {  
    Person person = new Person(personCreate.getFirstName(),securityContext);  
    updatePersonNoMerge(person, personCreate); 
     return person;  
     }

AuthorService in library-service jar

@PluginInfo(version = 1)  
@Extension  
@Component  
public class AuthorService implements ServicePlugin {  
  
  @PluginInfo(version = 1)  
  @Autowired  
  private AuthorRepository repository;  
  @Autowired  
  private Logger logger;  
  
  @PluginInfo(version = 1)  
   @Autowired  
  private PersonService personService;  
  
 public Author createAuthor(AuthorCreate authorCreate,  
  SecurityContext securityContext) {  
      Author author = createAuthorNoMerge(authorCreate, securityContext);  
  repository.merge(author);  
 return author;  
  }  
  
   public Author createAuthorNoMerge(AuthorCreate authorCreate,  
  SecurityContext securityContext) {  
      Author author = new Author(authorCreate.getFirstName(),  
  securityContext);  
  updateAuthorNoMerge(author, authorCreate);  
 return author;  
  }

The first code snippet shows a PersonService plugin managing a person CRUD (only create is shown) . the second code sinppet shows an AuthorService plugin managing authors which is dependent on PersonService . both plugins are compiled separately. use by placing both of them in the FlexiCore plugin directory

⁠Debugging Plugins

add the relevant debuggin line to your java properties for java 11: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8787

for java 8: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787

now from your IDE connect to the port specified in the above command (8787)

⁠Documentation

FlexiCore maintains a reference documentation⁠

⁠Docker

if your machine is running docker ( if not installation instructions are available in docker documentation site⁠ ) simply run:

docker run -p 8080:8080 wizzdi/flexicore

once initialization is complete a swagger will be avilable at http://:8080/FlexiCore the default username is [email protected]⁠ the password is randomlly generated and can be found in the docker container at /home/flexicore/firstRun.txt docker image is available at Docker Hub⁠

⁠Stay in Touch

Contact us at our site⁠

⁠Main 3rd Party Dependencies

Spring Boot⁠

Pf4J⁠

Tag summary

Content type

Image

Digest

sha256:6f41758f7…

Size

197.5 MB

Last updated

almost 4 years ago

docker pull wizzdi/flexicore