Fixed issue [Spring] Add support for the contextPath in Spring-boot gen #3193

This commit is contained in:
vovan-
2016-07-06 09:28:35 +03:00
committed by Vovan
parent 3a3461f961
commit 01e06c01eb
2 changed files with 4 additions and 1 deletions

View File

@@ -126,7 +126,7 @@ public class SpringCodegen extends AbstractJavaCodegen {
(sourceFolder + File.separator + configPackage).replace(".", java.io.File.separator), "HomeController.java")); (sourceFolder + File.separator + configPackage).replace(".", java.io.File.separator), "HomeController.java"));
supportingFiles.add(new SupportingFile("swagger2SpringBoot.mustache", supportingFiles.add(new SupportingFile("swagger2SpringBoot.mustache",
(sourceFolder + File.separator + basePackage).replace(".", java.io.File.separator), "Swagger2SpringBoot.java")); (sourceFolder + File.separator + basePackage).replace(".", java.io.File.separator), "Swagger2SpringBoot.java"));
supportingFiles.add(new SupportingFile("application.properties", supportingFiles.add(new SupportingFile("application.mustache",
("src.main.resources").replace(".", java.io.File.separator), "application.properties")); ("src.main.resources").replace(".", java.io.File.separator), "application.properties"));
} }
if (library.equals("spring-mvc")) { if (library.equals("spring-mvc")) {

View File

@@ -0,0 +1,3 @@
springfox.documentation.swagger.v2.path=/api-docs
server.contextPath={{^contextPath}}/{{/contextPath}}{{#contextPath}}{{contextPath}}{{/contextPath}}
#server.port=8090