updated to use new EnableDiscoveryClient. Updated travis.

This commit is contained in:
Spencer Gibb
2014-12-02 13:00:43 -07:00
parent 5b5c4e4496
commit 17c016dc9b
4 changed files with 10 additions and 8 deletions

View File

@@ -13,7 +13,7 @@ script:
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] || mvn --settings .settings.xml install -nsu -Dmaven.test.redirectTestOutputToFile=true'
env:
global:
- GIT_NAME="Dave Syer"
- GIT_EMAIL=dsyer@pivotal.io
- CI_DEPLOY_USERNAME=buildmaster
- secure: aeLXRC5oFSddwnZt1/7G2/OHr7jDbxz0ET7sej3I+eSbe3N5vbzQ6FC08es4l89l54ciXd90I1g2BMw7DTYKOO373FP78XPdAEbifJTU4DGd6fCELmoTtUPhjunBIk7E49hisPbv82892IYYA7qi/hzG548cPyZ1IgiJjq0NCsc=
- GIT_NAME="Spencer Gibb"
- GIT_EMAIL=sgibb@pivotal.io
- CI_DEPLOY_USERNAME=sgibb
- secure: MX+bQxI10+lHI1rbX/xPSH+Ybey08YwfUQeiJIc2L7wymY5zFtOB63Hf2Iy9sf4FXmM+nNj/OWtg/ROPZNqjcNHNoqF7L8Kz2g/S2T+bHUI7KvMzcSdqief+Z1ywk8XfcEVAjPjUYS6wo6kPFUQy7SDRPOxFO9II1+zdKv4vI80=

View File

@@ -7,7 +7,7 @@ import org.springframework.context.annotation.Configuration;
* @author Spencer Gibb
*/
@Configuration
public class ConsulDiscoveryAutoConfiguration {
public class ConsulDiscoveryClientConfiguration {
@Bean
public ConsulLifecycle consulLifecycle() {
return new ConsulLifecycle();

View File

@@ -1,3 +1,3 @@
# Auto Configuration
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.consul.discovery.ConsulDiscoveryAutoConfiguration
# Discovery Client Configuration
org.springframework.cloud.client.discovery.EnableDiscoveryClient=\
org.springframework.cloud.consul.discovery.ConsulDiscoveryClientConfiguration

View File

@@ -7,6 +7,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.bind.RelaxedPropertyResolver;
import org.springframework.cloud.bus.jackson.SubtypeModule;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.consul.bus.SimpleRemoteEvent;
import org.springframework.cloud.consul.discovery.ConsulLoadBalancerClient;
import org.springframework.context.ApplicationListener;
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
*/
@Configuration
@EnableAutoConfiguration
@EnableDiscoveryClient
@RestController
@Slf4j
public class SampleApplication implements ApplicationListener<SimpleRemoteEvent> {