Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

erro ao inicializar o admin

os dois projetos estão com a mesma versão do spring boot: 2.4.2 pom do admin:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>br.com.alura</groupId>
    <artifactId>springbootadmin</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>springbootadmin</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>1.8</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-server</artifactId>
            <version>2.2.0</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

erro que aparece nos logs:

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    de.codecentric.boot.admin.server.services.AbstractEventHandler.start(AbstractEventHandler.java:57)

The following method did not exist:

    reactor.core.publisher.Flux.retryWhen(Ljava/util/function/Function;)Lreactor/core/publisher/Flux;

The method's class, reactor.core.publisher.Flux, is available from the following locations:

    jar:file:/C:/Users/Samsung/.m2/repository/io/projectreactor/reactor-core/3.4.2/reactor-core-3.4.2.jar!/reactor/core/publisher/Flux.class

The class hierarchy was loaded from the following locations:

    reactor.core.publisher.Flux: file:/C:/Users/Samsung/.m2/repository/io/projectreactor/reactor-core/3.4.2/reactor-core-3.4.2.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of reactor.core.publisher.Flux


Process finished with exit code 1

faltou algo?

1 resposta
solução!

Oi Fernanda,

Pode ter sido problema de incompatibilidade entre as versões do Spring Boot e do Spring Boot Admin.

Atualize a versão do seu Spring Boot Admin para a 2.3.1 e veja se resolve:

 <dependency>
    <groupId>de.codecentric</groupId>
    <artifactId>spring-boot-admin-starter-server</artifactId>
    <version>2.3.1</version>
</dependency>