Dans le fichier bootstrap.yml, la configuration est enregistrée à l'information Eureka, comme suit:L'API - projet de passerelle reçoit des informations de configuration Eureka à partir du serveur de configuration, comment peut-il être inscrit Eureka
eureka:
client:
service-url:
defaultZone: http://user:[email protected]:8761/eureka
instance:
prefer-ip-address: true
Le API - projet de passerelle peut être démarré normalement
Configurer les informations Eureka au repos git, l'API - projet de passerelle reçoit des informations de configuration Eureka de la configuration server.Start l'API de projet - passerelle, mais j'ai une exception: com. netflix.discovery.shared.transport.Transport Exception:. Impossible d'exécuter la demande sur un serveur connu Application de la classe principale:
@SpringCloudApplication
@EnableZuulProxy
public class ZuulApplication {
public static void main(String[] args) {
new SpringApplicationBuilder(ZuulApplication.class).web(true).run(args);
}
@Bean
@RefreshScope
@ConfigurationProperties("zuul")
public ZuulProperties zuulProperties() {
return new ZuulProperties();
}
}