title: Wiremock :How to read the stub from a file in wiremock?
body: <p>Currently I am setting up request and response in my stub through my java code like below.</p>
  <pre><code>wireMockRule.stubFor(WireMock.get(WireMock.urlEqualTo(&quot;/abc/xyz&quot;))
                  .willReturn(WireMock.aResponse()
                          .withBody(&quot;Hey&quot;)
                          .withStatus(HttpStatus.OK.value())
                          .withHeader(&quot;Content-Type&quot;,
                                  &quot;application/text&quot;)));
  </code></pre>
  <p>I wish to know if there is a possibility that I define all the stub configuration in the json file like below and just read it in my java code.</p>
  <pre><code>{
    &quot;request&quot;: {
      &quot;method&quot;: &quot;GET&quot;,
      &quot;url&quot;: &quot;/abc/xyz&quot;
    },
    &quot;response&quot;: {
      &quot;status&quot;: 200,
      &quot;jsonBody&quot;: {&quot;Hey&quot;},
      &quot;headers&quot;: {
        &quot;Content-Type&quot;: &quot;application/test&quot;
      }
    }
  }
  </code></pre>
  <p>I read about mapping folder over many post. I am not sure what that is and how do I get it and how can it help in my use case?</p>
  <p>Also, I read about body file name but that just helps with the response body while I wish to find a solution which helps with the whole stub from a file.</p>
  <p>A working java example would be really helpful.</p>