Unless you do not introduce jdbc-related dependencies, spring automatic configuration will always require you to have a database connection.
The h2 database can be introduced.
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>