原因就是服务无法注册到eureka
各种原因都有
检查每一种可能
这里由于使用了jdk12,eureka启动的时候并不会首先加载javax,导致eureka启动失败则服务无法注册
JDK12以后默认启动不会自动加载这个;必须降低版本;或者一定要使用则加入坐标,在pom中进行引入
<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>
否则报错:java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present