-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
post에서 swagger에서 테스트 할 수있게 config 설정 및 postDto에 있던 BoardType을 없앰. controller에서 따로 받게함.
- Loading branch information
Showing
4 changed files
with
34 additions
and
15 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/main/java/certis/CertisHomepage/config/SwaggerBeanConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package certis.CertisHomepage.config; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; | ||
|
||
import java.util.ArrayList; | ||
|
||
@Configuration | ||
public class SwaggerBeanConfig { | ||
|
||
public SwaggerBeanConfig(MappingJackson2HttpMessageConverter converter) { | ||
var supportedMediaTypes = new ArrayList<>(converter.getSupportedMediaTypes()); | ||
supportedMediaTypes.add(new MediaType("application", "octet-stream")); | ||
converter.setSupportedMediaTypes(supportedMediaTypes); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters