quando rodo o: mvn clean package, parece que nao consegue conectar com a database, mas tenho o codigo igual ao da aula.
me da esse erro:
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] LogsApplicationTests.contextLoads » IllegalState Failed to load ApplicationCon...
[INFO]
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.263 s
[INFO] Finished at: 2025-05-17T15:53:40+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project logs: There are test failures.
[ERROR]
[ERROR] Please refer to /home/pc/Downloads/27-03/Projeto inicial/grafana-loki/logs/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
application.properties
server.port=8080
# postgres
spring.datasource.url=jdbc:postgresql://database-api-cursos:5432/logsdb
spring.datasource.username=alura
spring.datasource.password=nJ6vsW37rCd1v88
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
# actuator
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=health,info,metrics,prometheus
# prometheus
management.metrics.enable.jvm=true
management.metrics.export.prometheus.enabled=true
management.metrics.distribution.slo.http=50ms,100ms,200ms,300ms,500ms,1s
management.metrics.tags.application=api-cursos
# project
info.app.name=@project.name@
info.app.description=@project.description@
info.app.version=@project.version@
info.app.encoding=@project.build.sourceEncoding@