title: Spring Boot: Getting error "Cannot determine embedded database driver class for database type NONE" when running JUnit test from eclipse
body: <p>I'm having a little problems running JUnit tests from Eclipse directly (using the "Run As JUnit test" on the JUnit test file I want to run) on a simple Spring Boot application.</p>
  
  <p>I'm using Gradle as a build tool.  Now, when running the test as a Gradle task it works just fine, but when running it as an Eclipse JUnit task it fails with the follwoing error</p>
  
  <pre><code>java.lang.IllegalStateException: Failed to load ApplicationContext
  ...
  Caused by: org.springframework.beans.factory.BeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath.
  </code></pre>
  
  <p>My application.properties files does define a local MySQL database and that seems to work fine with gradle:</p>
  
  <pre><code>spring.datasource.url: jdbc:mysql://localhost:3306/test
  spring.datasource.username=user
  spring.datasource.password=pass
  spring.datasource.driverClassName=com.mysql.jdbc.Driver
  spring.jpa.hibernate.ddl-auto=update
  </code></pre>
  
  <p>My Application Class:</p>
  
  <pre><code>@SpringBootApplication
  public class Application {
  </code></pre>
  
  <p>My Application test:</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @SpringApplicationConfiguration(classes = Application.class)
  @WebAppConfiguration
  public class ApplicationTests {
  </code></pre>
  
  <p>Any ideas?</p>