From e4151ba536cfa74a20c22d69defddd05009ec0ce Mon Sep 17 00:00:00 2001 From: Tomas Bjerre Date: Thu, 10 Oct 2024 18:37:33 +0200 Subject: [PATCH] fix: removing default resource names on classpath (refs #49) --- src/main/java/org/wiremock/spring/ConfigureWireMock.java | 2 +- .../src/test/java/app/SingleWireMockTest.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/wiremock/spring/ConfigureWireMock.java b/src/main/java/org/wiremock/spring/ConfigureWireMock.java index 4896b4c..3a5eb3e 100644 --- a/src/main/java/org/wiremock/spring/ConfigureWireMock.java +++ b/src/main/java/org/wiremock/spring/ConfigureWireMock.java @@ -57,7 +57,7 @@ * #filesUnderClasspath()}/{@link #name()} enabling different mappings for differently named * WireMocks. */ - String[] filesUnderClasspath() default {"wiremock", "stubs", "mappings"}; + String[] filesUnderClasspath() default {}; /** * Directory paths to pass to {@link WireMockConfiguration#usingFilesUnderDirectory(String)}. diff --git a/wiremock-spring-boot-example/src/test/java/app/SingleWireMockTest.java b/wiremock-spring-boot-example/src/test/java/app/SingleWireMockTest.java index 89773c7..2c1631a 100644 --- a/wiremock-spring-boot-example/src/test/java/app/SingleWireMockTest.java +++ b/wiremock-spring-boot-example/src/test/java/app/SingleWireMockTest.java @@ -15,7 +15,12 @@ import org.wiremock.spring.InjectWireMock; @SpringBootTest -@EnableWireMock({@ConfigureWireMock(name = "user-client", baseUrlProperties = "user-client.url")}) +@EnableWireMock({ + @ConfigureWireMock( + name = "user-client", + filesUnderClasspath = {"wiremock"}, + baseUrlProperties = "user-client.url") +}) class SingleWireMockTest { @Autowired private UserClient userClient;