formatting work
This commit is contained in:
@@ -9,7 +9,7 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
|
||||
@EnableConfigServer
|
||||
@EnableEurekaClient
|
||||
public class ConfigApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ConfigApplication.class, args);
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ConfigApplication.class, args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,18 +12,12 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
|
||||
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception{
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
auth.inMemoryAuthentication().withUser("configUser").password("configPassword").roles("SYSTEM");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.authorizeRequests()
|
||||
.anyRequest().hasRole("SYSTEM")
|
||||
.and()
|
||||
.httpBasic()
|
||||
.and()
|
||||
.csrf()
|
||||
.disable();
|
||||
http.authorizeRequests().anyRequest().hasRole("SYSTEM").and().httpBasic().and().csrf().disable();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,11 +5,7 @@ import org.springframework.cloud.netflix.feign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
@FeignClient(
|
||||
name = "rest-producer",
|
||||
url = "http://localhost:9090",
|
||||
fallback = GreetingClient.GreetingClientFallback.class
|
||||
)
|
||||
@FeignClient(name = "rest-producer", url = "http://localhost:9090", fallback = GreetingClient.GreetingClientFallback.class)
|
||||
public interface GreetingClient extends GreetingController {
|
||||
@Component
|
||||
public static class GreetingClientFallback implements GreetingClient {
|
||||
|
||||
Reference in New Issue
Block a user