Class SpringRegistrator

java.lang.Object
services.moleculer.config.SpringRegistrator
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class SpringRegistrator extends Object implements org.springframework.context.ApplicationContextAware
Register Spring Components as Moleculer Services in ServiceBroker. ServiceBroker must be a Spring Component also.
  • Field Details

    • packagesToScan

      protected String[] packagesToScan
      Java package(s) where the custom Spring/Moleculer Services are located. Do not use if you use Spring's "ComponentScan" feature.
    • logger

      protected final org.slf4j.Logger logger
  • Constructor Details

    • SpringRegistrator

      public SpringRegistrator()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • getPackagesToScan

      public String[] getPackagesToScan()
    • setPackagesToScan

      public void setPackagesToScan(String... packagesToScan)