Java 正在从start.spring运行项目,出现错误
我用Maven Java 2.0.0和Web、JPA、Vaadin从start.spring.io下载项目。 使用Java SDK 9在Intellij中打开它,按run,出现此错误Java 正在从start.spring运行项目,出现错误,java,spring,Java,Spring,我用Maven Java 2.0.0和Web、JPA、Vaadin从start.spring.io下载项目。 使用Java SDK 9在Intellij中打开它,按run,出现此错误 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2018-03-06 18:25:17.342 ERROR 1768 --- [
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
某些默认的Spring引导配置必须有一个类型为
javax.sql.DataSource
的Bean。如果定义了多个DataSource
实现,则必须声明其中一个primary
否则,Spring将默认基于多个属性查找现有数据库。请参阅标题为“连接到生产数据库”的部分。可能会延迟,但对其他人可能有用
我在尝试从spring启动应用程序连接PostgreSql DB时遇到了这个问题。我在pom.xml中有资源“