Eureka server:
Org. Springframework. Boot
& lt; ArtifactId> Spring - the boot - starter - parent
& lt; Version> 2.3.0. RELEASE
& lt; RelativePath/& gt; & lt; ! - lookup the parent from the repository - & gt;
& lt;/parent>
& lt; Properties>
& lt; Java. Version> 1.8 & lt;/Java. Version>
& lt; Spring - cloud. Version> Hoxton. SR4 & lt;/spring -- cloud. Version>
& lt;/properties>
& lt; Dependencies>
Org. Springframework. Cloud
Spring - the cloud - starter - netflix - eureka - server
Org. Springframework. Cloud
Spring - the cloud - dependencies
${spring - cloud. Version} & lt;/version>
Pom
Import
Yml configuration:
Server:
Port: 8761
Eureka:
Instance:
The hostname: localhost
Client:
RegisterWithEureka: false
FetchRegistry: false
ServiceUrl:
DefaultZone: http://${eureka. The instance. The hostname} : ${server port}/had been/
The client depends on:
Org. Springframework. Boot
Spring - the boot - starter - parent
2.3.0. RELEASE
1.8 & lt;/Java. Version>
Hoxton. SR4 & lt;/spring -- cloud. Version>
Org. Springframework. Cloud
Spring - the cloud - starter - netflix - eureka - client
Org. Springframework. Cloud
Spring - the cloud - dependencies
${spring - cloud. Version} & lt;/version>
Pom
Import
Yml configuration:
Eureka:
Client:
ServiceUrl:
DefaultZone: http://localhost:8761/eureka/
RegisterWithEureka: false
FetchRegistry: false
The main class notes played, it is not registered, ask the great spirit guide!!!!!
CodePudding user response: