Class ProjectGenerationController<R extends ProjectRequest>

java.lang.Object
io.spring.initializr.web.controller.ProjectGenerationController<R>
Type Parameters:
R - the ProjectRequest type to use to bind request parameters
Direct Known Subclasses:
DefaultProjectGenerationController

@RestController public abstract class ProjectGenerationController<R extends ProjectRequest> extends Object
Base RestController that provides endpoints for project generation.
Author:
Stephane Nicoll
  • Constructor Details

  • Method Details

    • projectRequest

      public abstract R projectRequest(@RequestHeader Map<String,String> headers)
      Create an initialized ProjectRequest instance to use to bind the parameters of a project generation request.
      Parameters:
      headers - the headers of the request
      Returns:
      a new ProjectRequest instance
    • getMetadata

      protected InitializrMetadata getMetadata()
    • invalidProjectRequest

      @ExceptionHandler public void invalidProjectRequest(jakarta.servlet.http.HttpServletResponse response, InvalidProjectRequestException ex) throws IOException
      Throws:
      IOException
    • pom

      @RequestMapping(path={"/pom","/pom.xml"}, method={GET,POST}) public org.springframework.http.ResponseEntity<byte[]> pom(R request)
    • gradle

      @RequestMapping(path={"/build","/build.gradle"}, method={GET,POST}) public org.springframework.http.ResponseEntity<byte[]> gradle(R request)
    • springZip

      @RequestMapping(path="/starter.zip", method={GET,POST}) public org.springframework.http.ResponseEntity<byte[]> springZip(R request) throws IOException
      Throws:
      IOException
    • springTgz

      @RequestMapping(path="/starter.tgz", method={GET,POST}, produces="application/x-compress") public org.springframework.http.ResponseEntity<byte[]> springTgz(R request) throws IOException
      Throws:
      IOException