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

Problema para subir configService

Olá, estou tendo problemas para subir meu configServer, segue o erro e as configurações


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
[32m :: Spring Boot :: [39m              [2m (v2.6.1)[0;39m

[2m2021-12-10 17:32:50.387[0;39m [32m INFO[0;39m [35m8692[0;39m [2m---[0;39m [2m[           main][0;39m [36mb.c.m.ConfigServerApplication           [0;39m [2m:[0;39m Starting ConfigServerApplication using Java 16.0.2 on DBC-001253 with PID 8692 (C:\Users\emanuel.queiroga\workspace-particular\config-server\target\classes started by emanuel.queiroga in C:\Users\emanuel.queiroga\workspace-particular\config-server)
[2m2021-12-10 17:32:50.390[0;39m [32m INFO[0;39m [35m8692[0;39m [2m---[0;39m [2m[           main][0;39m [36mb.c.m.ConfigServerApplication           [0;39m [2m:[0;39m No active profile set, falling back to default profiles: default
[2m2021-12-10 17:32:51.266[0;39m [32m INFO[0;39m [35m8692[0;39m [2m---[0;39m [2m[           main][0;39m [36mo.s.cloud.context.scope.GenericScope    [0;39m [2m:[0;39m BeanFactory id=05f6c003-8554-3a4e-8061-01c1ba1754d4
[2m2021-12-10 17:32:51.556[0;39m [32m INFO[0;39m [35m8692[0;39m [2m---[0;39m [2m[           main][0;39m [36mo.s.b.w.embedded.tomcat.TomcatWebServer [0;39m [2m:[0;39m Tomcat initialized with port(s): 8080 (http)
[2m2021-12-10 17:32:51.566[0;39m [32m INFO[0;39m [35m8692[0;39m [2m---[0;39m [2m[           main][0;39m [36mo.apache.catalina.core.StandardService  [0;39m [2m:[0;39m Starting service [Tomcat]
[2m2021-12-10 17:32:51.567[0;39m [32m INFO[0;39m [35m8692[0;39m [2m---[0;39m [2m[           main][0;39m [36morg.apache.catalina.core.StandardEngine [0;39m [2m:[0;39m Starting Servlet engine: [Apache Tomcat/9.0.55]
[2m2021-12-10 17:32:51.664[0;39m [32m INFO[0;39m [35m8692[0;39m [2m---[0;39m [2m[           main][0;39m [36mo.a.c.c.C.[Tomcat].[localhost].[/]      [0;39m [2m:[0;39m Initializing Spring embedded WebApplicationContext
[2m2021-12-10 17:32:51.664[0;39m [32m INFO[0;39m [35m8692[0;39m [2m---[0;39m [2m[           main][0;39m [36mw.s.c.ServletWebServerApplicationContext[0;39m [2m:[0;39m Root WebApplicationContext: initialization completed in 1207 ms
[2m2021-12-10 17:32:52.517[0;39m [33m WARN[0;39m [35m8692[0;39m [2m---[0;39m [2m[           main][0;39m [36mConfigServletWebServerApplicationContext[0;39m [2m:[0;39m Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultEnvironmentRepository' defined in class path resource [org/springframework/cloud/config/server/config/DefaultRepositoryConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: You need to configure a uri for the git repository.
[2m2021-12-10 17:32:52.521[0;39m [32m INFO[0;39m [35m8692[0;39m [2m---[0;39m [2m[           main][0;39m [36mo.apache.catalina.core.StandardService  [0;39m [2m:[0;39m Stopping service [Tomcat]
[2m2021-12-10 17:32:52.536[0;39m [32m INFO[0;39m [35m8692[0;39m [2m---[0;39m [2m[           main][0;39m [36mConditionEvaluationReportLoggingListener[0;39m [2m:[0;39m 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[2m2021-12-10 17:32:52.554[0;39m [31mERROR[0;39m [35m8692[0;39m [2m---[0;39m [2m[           main][0;39m [36mo.s.b.d.LoggingFailureAnalysisReporter  [0;39m [2m:[0;39m 

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

Description:

Invalid config server configuration.

Action:

If you are using the git profile, you need to set a Git URI in your configuration.  If you have set spring.cloud.config.server.bootstrap=true, you need to use a composite configuration.

@SpringBootApplication
@EnableConfigServer
public class ConfigServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(ConfigServerApplication.class, args);
    }

}
server:
  port: 8888

spring:
  profiles:
    active: native
  cloud:
    config:
      server:
        native:
          searchLocations: c:/microservice-repo
          #já tentei com search-locations
1 resposta
solução!

Galera consegui, foi só dar um maven update

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software