-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DEV-22] 이미지 요청 최대 파일 크기 10MB에서 20MB로 확장 (#69)
Co-authored-by: 5uhwann <[email protected]> Co-authored-by: MinsuKim <[email protected]> Co-authored-by: 5uhwann <[email protected]>
- Loading branch information
1 parent
84d7856
commit 464fc65
Showing
32 changed files
with
899 additions
and
122 deletions.
There are no files selected for viewing
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
36 changes: 36 additions & 0 deletions
36
src/main/java/ddingdong/ddingdongBE/common/config/OpenApiConfig.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,36 @@ | ||
package ddingdong.ddingdongBE.common.config; | ||
|
||
import io.swagger.v3.oas.models.Components; | ||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.security.SecurityScheme; | ||
import io.swagger.v3.oas.models.servers.Server; | ||
import java.util.List; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class OpenApiConfig { | ||
|
||
@Value("${swagger.server.url}") | ||
private String serverUrl; | ||
|
||
@Bean | ||
public OpenAPI openApi() { | ||
return new OpenAPI() | ||
.components(securityComponents()) | ||
.servers(List.of(new Server().url(serverUrl))); | ||
} | ||
|
||
private Components securityComponents() { | ||
return new Components() | ||
.addSecuritySchemes( | ||
"AccessToken", | ||
new SecurityScheme() | ||
.type(SecurityScheme.Type.HTTP) | ||
.scheme("bearer") | ||
.bearerFormat("JWT") | ||
); | ||
} | ||
|
||
} |
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
16 changes: 16 additions & 0 deletions
16
src/main/java/ddingdong/ddingdongBE/common/utils/EventQrGenerator.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,16 @@ | ||
package ddingdong.ddingdongBE.common.utils; | ||
|
||
import ddingdong.ddingdongBE.domain.event.controller.dto.response.EventQrResponse; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class EventQrGenerator { | ||
|
||
public static final String URI_PREFIX = "https://chart.apis.google.com/chart?cht=qr&chs=250x250&chl="; | ||
|
||
public EventQrResponse generateQrCodeUri(String studentName, String studentNumber) { | ||
String uri = URI_PREFIX + "https://ddingdong.club/event/code?studentName=" + studentName + "%26" + "studentNumber=" + studentNumber; | ||
|
||
return EventQrResponse.of(uri); | ||
} | ||
} |
Oops, something went wrong.