updated for commons-rest-api v1.1.x
This commit is contained in:
parent
d34d95ae42
commit
5399a77993
2
pom.xml
2
pom.xml
@ -26,7 +26,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.inteligr8</groupId>
|
<groupId>com.inteligr8</groupId>
|
||||||
<artifactId>common-rest-api</artifactId>
|
<artifactId>common-rest-api</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.1-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.ext</groupId>
|
<groupId>org.glassfish.jersey.ext</groupId>
|
||||||
|
@ -4,11 +4,12 @@ import org.springframework.beans.factory.annotation.Value;
|
|||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
import com.inteligr8.rs.ClientConfiguration;
|
import com.inteligr8.rs.ClientCxfConfiguration;
|
||||||
|
import com.inteligr8.rs.ClientJerseyConfiguration;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan
|
@ComponentScan
|
||||||
public class ApsClientConfiguration extends ClientConfiguration {
|
public class ApsClientConfiguration implements ClientCxfConfiguration, ClientJerseyConfiguration {
|
||||||
|
|
||||||
@Value("${process.service.baseUrl:http://localhost:8080/activiti-app}")
|
@Value("${process.service.baseUrl:http://localhost:8080/activiti-app}")
|
||||||
private String baseUrl;
|
private String baseUrl;
|
||||||
@ -42,6 +43,12 @@ public class ApsClientConfiguration extends ClientConfiguration {
|
|||||||
|
|
||||||
@Value("${process.service.security.oauth.grantPassword:#{null}}")
|
@Value("${process.service.security.oauth.grantPassword:#{null}}")
|
||||||
private String oAuthPassword;
|
private String oAuthPassword;
|
||||||
|
|
||||||
|
@Value("${process.service.cxf.defaultBusEnabled:true}")
|
||||||
|
private boolean defaultBusEnabled;
|
||||||
|
|
||||||
|
@Value("${process.service.jersey.putBodyRequired:true}")
|
||||||
|
private boolean putBodyRequired;
|
||||||
|
|
||||||
public String getBaseUrl() {
|
public String getBaseUrl() {
|
||||||
return this.baseUrl;
|
return this.baseUrl;
|
||||||
@ -86,5 +93,13 @@ public class ApsClientConfiguration extends ClientConfiguration {
|
|||||||
public String getOAuthPassword() {
|
public String getOAuthPassword() {
|
||||||
return this.oAuthPassword;
|
return this.oAuthPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isDefaultBusEnabled() {
|
||||||
|
return this.defaultBusEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPutBodyRequired() {
|
||||||
|
return this.putBodyRequired;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import com.inteligr8.rs.ClientConfiguration;
|
import com.inteligr8.rs.ClientCxfConfiguration;
|
||||||
import com.inteligr8.rs.ClientCxfImpl;
|
import com.inteligr8.rs.ClientCxfImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -18,7 +18,7 @@ public class ApsClientCxfImpl extends ClientCxfImpl {
|
|||||||
private ApsClientConfiguration config;
|
private ApsClientConfiguration config;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ClientConfiguration getConfig() {
|
protected ClientCxfConfiguration getConfig() {
|
||||||
return this.config;
|
return this.config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import com.inteligr8.rs.ClientConfiguration;
|
import com.inteligr8.rs.ClientJerseyConfiguration;
|
||||||
import com.inteligr8.rs.ClientJerseyImpl;
|
import com.inteligr8.rs.ClientJerseyImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -18,7 +18,7 @@ public class ApsClientJerseyImpl extends ClientJerseyImpl {
|
|||||||
private ApsClientConfiguration config;
|
private ApsClientConfiguration config;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ClientConfiguration getConfig() {
|
protected ClientJerseyConfiguration getConfig() {
|
||||||
return this.config;
|
return this.config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user