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

Error reason:
process analysis: you are integrating the springboot project. For me, in maven, bulid is added to prevent resources from being loaded. You can compare whether our contents are the same. I’m a fan of madness

<build>
    <resources>
        <resource>
            <directory>src/main/resources/</directory>
            <includes>
                <include>**/*.properties</include>
                <include>**/*.xml</include>
            </includes>
            <filtering>true</filtering>
        </resource>
        <resource>
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.properties</include>
                <include>**/*.xml</include>
            </includes>
            <filtering>true</filtering>
        </resource>
    </resources>
</build>


I use the application.yaml format, but the bulid above is to prevent the xx.properties and xx.xml files from being loaded. The ox’s head is not the horse’s mouth.

resolvent:

Method 1: delete directly
method 2:
, changed to:

the first one is recommended. The second one I haven’t seen, but I ran and succeeded.

Read More: