Spring Security + Sleuth
This commit is contained in:
parent
63897863b3
commit
c2eced0d66
16 changed files with 140 additions and 2 deletions
|
|
@ -40,6 +40,21 @@
|
|||
<artifactId>spring-cloud-starter-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-sleuth</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
package com.mcommerce.zuulserver;
|
||||
|
||||
import brave.sampler.Sampler;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableZuulProxy
|
||||
|
|
@ -13,4 +15,6 @@ public class ZuulServerApplication {
|
|||
public static void main(String[] args) {
|
||||
SpringApplication.run(ZuulServerApplication.class, args);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
package com.mcommerce.zuulserver.configuration;
|
||||
|
||||
import brave.sampler.Sampler;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class SleuthConfig {
|
||||
|
||||
|
||||
public Sampler defaultSampler(){
|
||||
return Sampler.ALWAYS_SAMPLE;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue