Hola compañeros tengo el siguiente error: APPLICATION FAILED TO START Description: Failed to configure a DataSource: ‘url’ attribute is...

Alejandro Manzano

Alejandro Manzano

Pregunta
studenthace 6 años

Hola compañeros tengo el siguiente error:


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).

2019-04-16 22:58:02.509 ERROR 8916 — [ main] o.s.test.context.TestContextManager : Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@488d1cd7] to prepare test instance [com.Manzano.HotelReservationApplicationTests@6b1dc20f]

mi archivo application.yaml esta así

spring: datasources: url: jdbc:postgresql://192.168.99.100:5432/postgres username: postgres password: platziManzano driver-class-name: org.postgresql.Driver jpa: hibernate: ddl-auto: create-drop generate-ddl: true show-sql: true <code>

con contenedor esta arriba, en omnidb la base tambien esta arriba.

no encuentro el error, espero puedan ayudar.

2 respuestas
para escribir tu comentario
    Alejandro Manzano

    Alejandro Manzano

    studenthace 6 años

    @erikashv bien dicen que el diablo esta en los detalles jaja, ayudo aunque tambien tuve un inconveniente al mapear las tablas. muchas gracias por tu ayuda

    Erika Hernández

    Erika Hernández

    studenthace 6 años

    Hola compañero! corrige "datasources" a "datasource" (segunda línea) y nos cuentas cómo te va :-)

Curso de Hibernate y Java Spring

Curso de Hibernate y Java Spring

Crear aplicaciones intuitivas comienza con un desarrollo ágil y eficiente. ¿Sabías que con Hibernate y Java Spring puedes optimizar procesos entre apps y bases de datos, o evitar acciones repetitivas, como escribir varias veces la mismas líneas de código? Ahora tendrás tiempo para hacer más de lo que te gusta: ¡nunca parar de aprender con Platzi!

Curso de Hibernate y Java Spring
Curso de Hibernate y Java Spring

Curso de Hibernate y Java Spring

Crear aplicaciones intuitivas comienza con un desarrollo ágil y eficiente. ¿Sabías que con Hibernate y Java Spring puedes optimizar procesos entre apps y bases de datos, o evitar acciones repetitivas, como escribir varias veces la mismas líneas de código? Ahora tendrás tiempo para hacer más de lo que te gusta: ¡nunca parar de aprender con Platzi!