我必须启动应用程序,一个eureka服务器和一个eureka客户端。
这是我的服务器配置
server:
port: 8761
spring:
application:
name: eureka-server
这是我的服务器代码
package fr.maif.eurekaserver;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
@SpringBootApplication
@EnableEurekaServer
@EnableZuulProxy
public class EurekaServerApplication {
public static void main(String[] args) {
SpringApplication.run(EurekaServerApplication.class, args);
}
}
这是客户端配置
spring:
application:
name: eureka-client
server:
port: 8083
eureka: