4

Im downloading project from start.spring.io with Maven Java 2.0.0 with Web,JPA,Vaadin. Opening it in Intellij with Java SDK 9, pressing run, and having this error

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-03-06 18:25:17.342 ERROR 1768 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

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

Description:

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

Reason: Failed to determine a suitable driver class
Glement
  • 413
  • 1
  • 5
  • 18

2 Answers2

0

Certain default Spring Boot configurations must have a Bean of type javax.sql.DataSource. If there are multiple DataSource implementations defined, one of them must be declared primary.

Failing that, Spring will default to looking up an existing database based on several properties. See the part of this webpage titled "Connection to a Production Database".

Yserbius
  • 1,375
  • 12
  • 18
  • so what i should do after downloading project? In youtube guides they just download from spring.start and running it – Glement Mar 06 '18 at 17:31
  • Then you have to specifically exclude the datasource configuration. See [this question](https://stackoverflow.com/questions/32074631/spring-boot-application-without-a-datasource). – Yserbius Mar 06 '18 at 17:34
0

Could be late, but it might be useful for others.

I faced this issue, when trying to connect PostgreSql DB from spring boot application. I had resources "< resources >" filter in pom.xml which filtered out few of the sql files which are needed. When I removed that the error has gone.