@SpringBootApplication
@EnableEurekaServer
@EnableWebSecurity
public class EurekaStarter extends WebSecurityConfigurerAdapter {
public static void main(String[] args) {
SpringApplication.run(EurekaStarter.class,args);
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable()
.authorizeRequests()
.antMatchers("/actuator/**").permitAll()
.antMatchers("/eureka/**").permitAll()
.anyRequest()
.authenticated().and().httpBasic();
}