2
respostas

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured

Após implementar a configuração para a loja apontar para o configServer não consigo mais subir o projeto da loja. https://gitlab.com/allanbc/loja.git https://gitlab.com/allanbc/fornecedor.git https://gitlab.com/allanbc/config-server.git

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

Description:

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class


Action:

Consider the following:
    If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
    If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
2 respostas

Aparentemente não encontrou as configurações para a aplicação loja (está reclamando da URL)

Posta aqui seu application.yaml, por favor.

application.yaml da loja:

server:
  port: 8080

eureka:
  client:
    register-with-eureka: true
    fetch-registry: true
    service-url:
      defaultZone: http://localhost:8761/eureka

application.yaml do config-server:


server:
  port: 8888

spring:
  cloud:
    config:
      server:
        encrypt:
            enabled: false
        git:
          uri: https://github.com/arthur-alura/microservice-repo/
          search-paths: fornecedor, loja, transportador

application.yaml da loja:

server:
  port: 8082

eureka:
  client:
    register-with-eureka: true
    fetch-registry: true
    service-url:
      defaultZone: http://localhost:8761/eureka

application.yaml do config-server:


server:
  port: 8888

spring:
  cloud:
    config:
      server:
        git:
          uri: https://gitlab.com/allanbc/microservice-repo.git
          search-paths: fornecedor, loja

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