Class PreviewController

java.lang.Object
io.micronaut.starter.api.create.AbstractCreateController
io.micronaut.starter.api.preview.PreviewController
All Implemented Interfaces:
PreviewOperations

@Controller("/preview") public class PreviewController extends AbstractCreateController implements PreviewOperations
Previews an application contents.
Since:
1.0.0
Author:
graemerocher
  • Constructor Details

    • PreviewController

      public PreviewController(ProjectGenerator projectGenerator, io.micronaut.context.event.ApplicationEventPublisher eventPublisher)
      Default constructor.
      Parameters:
      projectGenerator - The project generator
      eventPublisher - The event publisher
  • Method Details

    • previewApp

      @Get(uri="/{type}/{name}{?features,lang,build,test,javaVersion}", produces="application/json") public PreviewDTO previewApp(ApplicationType type, String name, @Nullable @Nullable List<String> features, @Nullable @Nullable BuildTool build, @Nullable @Nullable TestFramework test, @Nullable @Nullable Language lang, @Nullable @Nullable JdkVersion javaVersion, RequestInfo requestInfo) throws IOException
      Previews the contents of a generated application..
      Specified by:
      previewApp in interface PreviewOperations
      Parameters:
      type - The application type The application type
      name - The name of the application The name of the application
      features - The features The chosen features
      build - The build type (optional, defaults to Gradle)
      test - The test framework (optional, defaults to JUnit)
      lang - The language (optional, defaults to Java)
      javaVersion - The jdk version (optional, defaults to MicronautJdkVersionConfiguration.DEFAULT_OPTION)
      requestInfo - The request info
      Returns:
      A preview of the application contents.
      Throws:
      IOException