没有注册的Eureka客户端实例。(JAVA11,Maven)
我正在使用Java11和Maven开发SpringCloud项目 我尝试在Eureka服务器上注册Eureka客户端服务。但Eureka仪表板上没有显示注册服务 我一直试图在互联网上搜索解决方案,包括Stackoverflow,但没有运气 这是我在Eureka项目中对pom.xml的依赖项没有注册的Eureka客户端实例。(JAVA11,Maven),java,spring,maven,netflix-eureka,Java,Spring,Maven,Netflix Eureka,我正在使用Java11和Maven开发SpringCloud项目 我尝试在Eureka服务器上注册Eureka客户端服务。但Eureka仪表板上没有显示注册服务 我一直试图在互联网上搜索解决方案,包括Stackoverflow,但没有运气 这是我在Eureka项目中对pom.xml的依赖项 <properties> <java.version>11</java.version> <spring-cloud.version>Hoxt
<properties>
<java.version>11</java.version>
<spring-cloud.version>Hoxton.SR8</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
server.port=8761
spring.application.name=eureka-server
eureka.instance.hostname=localhost
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.client.service-url.defaultZone=http://localhost:8761/eureka/
eureka.server.enableSelfPreservation=true
logging.level.com.netflix.eureka=OFF
logging.level.com.netflix.discovery=OFF
message=Eureka hello
这是我的一个客户端服务属性(auth server)
与AuthServerApplication.java文件一起
@EnableDiscoveryClient
@SpringBootApplication
public class AuthServerApplication {
public static void main(String[] args) {
SpringApplication.run(AuthServerApplication.class, args);
}
}
启动身份验证服务时出现的错误。如果它未能注册到Eureka服务器,它应该在日志中抛出一些错误,否则如果注册成功,它将在日志中写入相同的错误。请更新问题中的错误日志。
@EnableDiscoveryClient
@SpringBootApplication
public class AuthServerApplication {
public static void main(String[] args) {
SpringApplication.run(AuthServerApplication.class, args);
}
}