forked from loafle/openapi-generator-original
Enforce Java 1.8 when generating spring-mvc with j8-async option
The spring-mvc j8-async code is now located in it's own sample directory with Java 8 enforced via Maven plug-in.
This commit is contained in:
@@ -178,6 +178,18 @@ public class SpringMVCServerCodegen extends JavaClientCodegen implements Codegen
|
||||
apiTemplateFiles.remove(this.templateFileName);
|
||||
this.templateFileName = "api-j8-async.mustache";
|
||||
apiTemplateFiles.put(this.templateFileName, ".java");
|
||||
|
||||
int originalPomFileIdx = -1;
|
||||
for (int i = 0; i < supportingFiles.size(); i++) {
|
||||
if ("pom.xml".equals(supportingFiles.get(i).destinationFilename)) {
|
||||
originalPomFileIdx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (originalPomFileIdx > -1) {
|
||||
supportingFiles.remove(originalPomFileIdx);
|
||||
}
|
||||
supportingFiles.add(new SupportingFile("pom-j8-async.mustache", "", "pom.xml"));
|
||||
}
|
||||
|
||||
return objs;
|
||||
|
||||
Reference in New Issue
Block a user