Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Commit

Permalink
fix-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Little-Excited committed May 15, 2024
1 parent 1e8e10b commit 84e8e31
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,21 @@
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
* Configuration for the web
* <p>
* This configuration is used to add a prefix to all the endpoints.
*/
@Configuration
public class WebConfig implements WebMvcConfigurer {

/**
* Add a prefix to all the endpoints.
*
* @param configurer the path match configurer
*/
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
public void configurePathMatch(final PathMatchConfigurer configurer) {
configurer.addPathPrefix("/v1", c -> true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class FileControllerITSpec extends AbstractITSpec {

MockHttpServletRequestBuilder builder =
MockMvcRequestBuilders
.multipart("/file/upload")
.multipart("/v1/file/upload")
.file(mockMultipartFile)

then:
Expand Down

0 comments on commit 84e8e31

Please sign in to comment.