更改 WireMock __files 目录
Changing WireMock __files directory
来自docs:
To read the body content from a file, place the file under the __files
directory. By default this is expected to be under src/test/resources
when running from the JUnit rule. When running standalone it will be
under the current directory in which the server was started. To make
your stub use the file, simply call bodyFile() on the response builder
with the file’s path relative to __files:
可以改吗?为什么 WireMock 会坚持使用这个特定目录?
WireMock 坚持该特定目录,因为它必须有一些特定目录。
如果你想改变它,你可以这样做。 Check out the File Locations
section under the configuration documentation.
来自docs:
To read the body content from a file, place the file under the __files directory. By default this is expected to be under src/test/resources when running from the JUnit rule. When running standalone it will be under the current directory in which the server was started. To make your stub use the file, simply call bodyFile() on the response builder with the file’s path relative to __files:
可以改吗?为什么 WireMock 会坚持使用这个特定目录?
WireMock 坚持该特定目录,因为它必须有一些特定目录。
如果你想改变它,你可以这样做。 Check out the File Locations
section under the configuration documentation.