# springboot application.properties不生效

APPLICATION FAILED TO START

Description:

Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable 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).

1.想着会不会是谁不小心把pom里的packaging给设置错了，可以将设置一下，改成jar。很快这个被推翻了，因为并没有改动。

2.想着还可能是谁不小心在子module里面又加了一个module，虽然remove，delete，但是modules标签与还在pom还在的原因。但是看了一下也不是这个原因。

3.想着会不会是谁不小心把pom的build->resource->include的规则给改了，于是在maven的pom.xml重新声明include规则。改完以后运行试一下。发现好了。

<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>