diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/web.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/web.mustache
index 2046f433bb93..8cd666106f9d 100644
--- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/web.mustache
+++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/web.mustache
@@ -34,7 +34,7 @@
swagger.api.basepath
- http://localhost:8080
+ {{basePath}}
2