Re: Agent behind of proxy server

Follow

Originally posted by kaczynskid on 2012-03-22 15:30:40

Depending on the version of the Spring You're using and the type of configuration:

1) XML (valid for all Spring versions)
    
        http://my.proxy.host.com" />
        
    
2) XML using the p namespace (since Spring version 3.0):
    http://my.proxy.host.com"
        p:proxyPort="54321" />
3) Java config (since Spring version 3.0)
@Configuration
public class MyConfiguration {

    @Bean
    public Platform cumulocityPlatform() {
        PlatformImpl platform = new PlatformImpl();
        platform.setProxyHost("http://my.proxy.host.com");
        platform.setProxyPort(54321);
        return platform;
    }
}
All other Cumulocity Platform properties can be set the same way too.

For a complete end to end example of using Spring with Cumulocity SDK have a look at cumulocity-examples, in particular the com.cumulocity.agents.mps Spring configuration.
Have more questions? Submit a request

Comments