Commit 37639922 authored by Selvakumar Kamatchinathan's avatar Selvakumar Kamatchinathan
Browse files

corrected url for proxy

parent c20e1ed4
...@@ -46,7 +46,7 @@ pipeline { ...@@ -46,7 +46,7 @@ pipeline {
} }
steps { steps {
echo 'Deploying to Staging' echo 'Deploying to Staging'
sh "curl --upload-file staging/target/amp-t2d-property-registry-*.war 'http://'${tomcatCredentials}'@'${stagingHost}':8080/manager/text/deploy?path=/ega/t2d/registry&update=true' | grep 'OK - Deployed application at context path '" sh "curl --upload-file staging/target/amp-t2d-property-registry-*.war 'http://'${tomcatCredentials}'@'${stagingHost}':8080/manager/text/deploy?path=/registry&update=true' | grep 'OK - Deployed application at context path '"
} }
} }
stage('Deploy To FallBack And Production') { stage('Deploy To FallBack And Production') {
...@@ -57,9 +57,9 @@ pipeline { ...@@ -57,9 +57,9 @@ pipeline {
} }
steps { steps {
echo 'Deploying to Fallback' echo 'Deploying to Fallback'
sh "curl --upload-file fallback/target/amp-t2d-property-registry-*.war 'http://'${tomcatCredentials}'@'${fallbackHost}':8080/manager/text/deploy?path=/ega/t2d/registry&update=true' | grep 'OK - Deployed application at context path '" sh "curl --upload-file fallback/target/amp-t2d-property-registry-*.war 'http://'${tomcatCredentials}'@'${fallbackHost}':8080/manager/text/deploy?path=/registry&update=true' | grep 'OK - Deployed application at context path '"
echo 'Deploying to Production' echo 'Deploying to Production'
sh "curl --upload-file production/target/amp-t2d-property-registry-*.war 'http://'${tomcatCredentials}'@'${productionHost}':8080/manager/text/deploy?path=/ega/t2d/registry&update=true' | grep 'OK - Deployed application at context path '" sh "curl --upload-file production/target/amp-t2d-property-registry-*.war 'http://'${tomcatCredentials}'@'${productionHost}':8080/manager/text/deploy?path=/registry&update=true' | grep 'OK - Deployed application at context path '"
archiveArtifacts artifacts: 'production/target/amp-t2d-property-registry-*.war' , fingerprint: true archiveArtifacts artifacts: 'production/target/amp-t2d-property-registry-*.war' , fingerprint: true
} }
} }
......
...@@ -24,7 +24,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -24,7 +24,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
import org.springframework.core.env.Environment;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.context.request.async.DeferredResult; import org.springframework.web.context.request.async.DeferredResult;
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration; import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
...@@ -37,13 +36,11 @@ import springfox.documentation.service.Contact; ...@@ -37,13 +36,11 @@ import springfox.documentation.service.Contact;
import springfox.documentation.service.Tag; import springfox.documentation.service.Tag;
import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.data.rest.configuration.SpringDataRestConfiguration; import springfox.documentation.spring.data.rest.configuration.SpringDataRestConfiguration;
import springfox.documentation.spring.web.paths.RelativePathProvider;
import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger.web.UiConfiguration; import springfox.documentation.swagger.web.UiConfiguration;
import springfox.documentation.swagger.web.UiConfigurationBuilder; import springfox.documentation.swagger.web.UiConfigurationBuilder;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
import javax.servlet.ServletContext;
import java.lang.reflect.WildcardType; import java.lang.reflect.WildcardType;
import static springfox.documentation.schema.AlternateTypeRules.newRule; import static springfox.documentation.schema.AlternateTypeRules.newRule;
...@@ -56,21 +53,9 @@ public class SwaggerConfiguration { ...@@ -56,21 +53,9 @@ public class SwaggerConfiguration {
@Autowired @Autowired
private TypeResolver typeResolver; private TypeResolver typeResolver;
@Autowired
private Environment env;
@Autowired
private ServletContext servletContext;
@Bean @Bean
public Docket propertyRegistryApi() { public Docket propertyRegistryApi() {
return new Docket(DocumentationType.SWAGGER_2) return new Docket(DocumentationType.SWAGGER_2)
.pathProvider(new RelativePathProvider(servletContext) {
@Override
public String getApplicationBasePath() {
return "/ega/ampt2d/registry";
}
})
.select() .select()
.apis(RequestHandlerSelectors.any()) .apis(RequestHandlerSelectors.any())
.paths(getScanRestServicesPathPredicate()) .paths(getScanRestServicesPathPredicate())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment