title: why spring boot not use application.properties in test resources first?
body: <p>I have a special properties file in test resources directory</p>
  
  <pre><code>└── test
      ├── java
      │   └── com
      │       └── inter3i
      │               ├── dao
      │               │   └── FooMapperTest.java
      └── resources
          └── application.properties
  </code></pre>
  
  <p>in this application.properties file I specify the MySQL URL. </p>
  
  <pre><code>spring.datasource.url=jdbc:mysql://139.224.xxx.xxx/foo?useSSL=false
  </code></pre>
  
  <p>then I execute a test</p>
  
  <pre><code>mvn test -Dtest=com.foo.reportapi.dao.FooMapperTest
  </code></pre>
  
  <p>but it is failed  because</p>
  
  <pre><code>org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
  
  The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
      at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:289) ~[spring-jdbc-4.3.10.RELEASE.jar:4.3.10.RELEASE]
  </code></pre>
  
  <p>but actually the MySQL URK is OK, why does it have this error? From wireshark I know it actually connected to another URL</p>
  
  <pre><code>spring.datasource.url=jdbc:mysql://192.168.0.25/foo
  </code></pre>
  
  <p>which configured in <code>application-default.properties</code></p>
  
  <pre><code>src
  ├── main
  │   └── resources
  │       ├── application-default.properties
  </code></pre>
  
  <p>So why is it so counterintuitive? I think test classes should use <code>application.properties</code> in test resources first.</p>
  
  <p>In addition I have to use wireshark to find which URL it is connecting to, how could I get Spring Boot to output MySQL URL info explicitly?  </p>