出现下面的问题:
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
//无法配置数据库,没有指定url属性,并且无法配置embedded datasource
Reason: Failed to determine a suitable driver class
//原因:无法明确指定正确的驱动类(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).
Process finished with exit code 1
可以试着以下方式:
在<dependencies>******</dependencies>加入以下依赖:
<!--bootstrap.yml配置引用(加了这个依赖配置文件才能使用)-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
</dependency>
如果还是出现上述问题:
找到<build>******</build>在这个里面找到
<!--<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>-->
注释掉在此执行