title: I use resttemplate to test my web service but when I run the test I have an error connection to the application
body: <p>I use resttemplate to test my web service knowing that I use h2 as database but when I run the test I have an application connection error
  error:
  org.springframework.we.client.RessourceAccessException: I/O error on get request for "<a href="http://localhost" rel="nofollow noreferrer">http://localhost</a>: 8082 / parcours":Connect to localhost:8082
  I do not know how to start spring boot automatically and it points to my application file that points to h2 database and not the other database</p>
  
  <pre><code>@Configuration
  public class TestConfig
  {
      @Bean
  public TestRestTemplate myRestTemplate()
  {
  return new TestRestTemplate();
  }
  
  }
  
  
  
  @RunWith(SpringRunner.class)
  @ContextConfiguration(location ={"file:src/ressources/applicationContext.xml"},classes = TestConfig.class)
  @RestClienTest(value={ParcoursRessource.class})
  @SpringBootTest(classes = Application.class)
  public class TestParcoursRessource 
  {
  
  @Autowired
      private RestTemplate myRestTemplate;
  
  @Test
  public void listerParcours()
  {
   ResponseEntity&lt;String&gt; responseEntity = myRestTemplate.getForEntity("http://localhost:8082/parcours",String.class);
  Assert.assertEquals(OK.getStatusCode(),responseEntity.getStatusCodeValue())
  }
  }
  </code></pre>