Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 正在从start.spring运行项目,出现错误_Java_Spring - Fatal编程技术网

Java 正在从start.spring运行项目,出现错误

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 --- [

我用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 --- [           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中有资源“”过滤器,它过滤掉了一些需要的sql文件。当我删除时,错误已经消失。

那么下载project后我应该怎么做?在youtube指南中,他们只是从spring.start下载并运行它,然后您必须明确排除数据源配置。看见