Class SpringBootExtra

java.lang.Object
net.officefloor.spring.starter.rest.SpringBootExtra

public class SpringBootExtra extends Object

Provides means to load services from other Spring boot starters (other than Spring MVC).

This allows users to selectively use what they require.

  • Constructor Details

    • SpringBootExtra

      public SpringBootExtra()
  • Method Details

    • loadService

      public static <S> S loadService(String extraClassName, String serviceClassName, SourceContext sourceContext, S defaultService) throws Exception
      Loads the Service.
      Type Parameters:
      S - Service type.
      Parameters:
      extraClassName - Class that will exist if the Spring Boot extra is on the class path.
      serviceClassName - Class of service.
      sourceContext - SourceContext.
      defaultService - Default service. May be null.
      Returns:
      Service.
      Throws:
      Exception - If fails to load service.