0
私はスプリングブートアプリケーションをspring-boot-admin
サーバーに登録します。ここで スプリングブート管理者、クライアント登録の結果が不正です
SpringBootAdminApplication.java
@Configuration
@EnableAutoConfiguration
@EnableAdminServer
public class SpringBootAdminApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootAdminApplication.class, args);
}
}
そしてpom.xml
次のとおりです。
<dependencies>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-example</artifactId>
<version>1.0.5</version>
</dependency>
</dependencies>
とapplication.properties
server.port = 8080
サーバーは現在実行されている:
さて、クライアント側で:
プロパティ:
spring.boot.admin.url=http://localhost:8080
[email protected]@
spring.application.name=rest-module
のpom.xml:私はクライアントからの春のブートを実行したときに、私が取得
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>1.3.0</version>
</dependency>
しかし、このエラー:
Created POST request for "http://localhost:8080/api/applications"
Setting request Accept header to [application/json, application/json, application/*+json, application/*+json]
Writing [Application [id=null, name=rest-module, managementUrl=http://Hayatloo-PC:8082, healthUrl=http://Hayatloo-PC:8082/health, serviceUrl=http://Hayatloo-PC:8082]] as "application/json" using [org.springfr[email protected]1637320b]
Failed to register application as Application [id=null, name=rest-module, managementUrl=http://Hayatloo-PC:8082, healthUrl=http://Hayatloo-PC:8082/health, serviceUrl=http://Hayatloo-PC:8082] at spring-boot-admin (http://localhost:8080/api/applications): 400 Bad Request
なぜid=null
?
答えてくれてありがとう、私はガイドの依存関係を使用する場合、私は、サーバー側でこのerrroを得る:de.codecentric.boot.admin.config.HazelcastStoreConfiguration.applicationStore' 'はIllegalArgumentExceptionに 'エラー処理条件:@ConditionalOnMissingBean注釈には少なくとも1つのBean(タイプ、名前、または注釈)を指定する必要があります。 – Sajad
最新のスプリングブートを使用していますか? – joshiste
私の春のブートバージョンは '1.2.6.RELEASE' – Sajad