https://linen.dev logo
Title
a

Andres Martin Saldaña

04/26/2023, 12:33 PM
Hi everyone 🙌! I’m trying to develop a project with springboot to set up a mock server, but all the jsons configured at mappings directory, doesn’t work. However, if I configure the stub like this (in the springboot main class):
@EventListener(ApplicationReadyEvent.class)
    void configureStubs() {
        stubFor(get(urlPathMatching("/hello-world")).willReturn(aResponse()
                .withHeader("Content-Type", "text/plain")
                .withBody("Hello World")));
    }
the endpoint works properly… How can I set the jsons file directory in application.yml to configure all my endpoints? Thanks!
o

Oleg Nenashev

04/26/2023, 2:39 PM