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

Commit

Permalink
resolved deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadreia committed Dec 18, 2020
1 parent e0c1915 commit 6411a37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,7 @@ public void documentUploadPortrait ( ) throws Exception {

final MockMultipartFile portrait = new MockMultipartFile("portrait", "portrait.png", MediaType.IMAGE_PNG_VALUE, "i don't care".getBytes());

this.mockMvc.perform(MockMvcRequestBuilders.fileUpload("/customers/" + customer.getIdentifier() + "/portrait")
this.mockMvc.perform(MockMvcRequestBuilders.multipart("/customers/" + customer.getIdentifier() + "/portrait")
.file(portrait))
.andExpect(status().isAccepted())
.andDo(document("document-upload-portrait"));
Expand Down Expand Up @@ -1447,7 +1447,7 @@ public void documentReplacePortrait ( ) throws Exception {

final MockMultipartFile secondFile = new MockMultipartFile("portrait", "test.png", MediaType.IMAGE_PNG_VALUE, "i care".getBytes());

this.mockMvc.perform(MockMvcRequestBuilders.fileUpload("/customers/" + customer.getIdentifier() + "/portrait")
this.mockMvc.perform(MockMvcRequestBuilders.multipart("/customers/" + customer.getIdentifier() + "/portrait")
.file(secondFile))
.andExpect(status().isAccepted())
.andDo(document("document-replace-portrait"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
@EnableAutoConfiguration
Expand All @@ -59,7 +59,7 @@
CustomerServiceConfiguration.class
})
@EnableConfigurationProperties({UploadProperties.class})
public class CustomerRestConfiguration extends WebMvcConfigurerAdapter {
public class CustomerRestConfiguration implements WebMvcConfigurer {

public CustomerRestConfiguration() {
super();
Expand All @@ -69,9 +69,4 @@ public CustomerRestConfiguration() {
public Logger logger(final ApplicationName applicationName) {
return LoggerFactory.getLogger(applicationName.getServiceName());
}

@Override
public void configurePathMatch(final PathMatchConfigurer configurer) {
configurer.setUseSuffixPatternMatch(Boolean.FALSE);
}
}

0 comments on commit 6411a37

Please sign in to comment.