-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from selab-hs/develop
reface : 수정 사항 변경
- Loading branch information
Showing
52 changed files
with
276 additions
and
268 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CREATE TABLE `short_url` ( | ||
`id` BIGINT NOT NULL AUTO_INCREMENT, | ||
`origin_url` VARCHAR(255) NOT NULL, | ||
`create_at` DATETIME DEFAULT CURRENT_TIMESTAMP, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT = 20000; |
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 @@ | ||
INSERT INTO `short_url` (`origin_url`) VALUES ('https://example.com'); |
2 changes: 1 addition & 1 deletion
2
...org/service/urlshortener/Application.java → ...in/java/com/urlshortener/Application.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
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
8 changes: 4 additions & 4 deletions
8
...r/batch/scheudler/UrlDeleteScheduler.java → ...r/batch/scheudler/UrlDeleteScheduler.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
2 changes: 1 addition & 1 deletion
2
...org/service/urlshortener/cache/Cache.java → ...in/java/com/urlshortener/cache/Cache.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
4 changes: 2 additions & 2 deletions
4
...vice/urlshortener/cache/CacheFactory.java → .../com/urlshortener/cache/CacheFactory.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
4 changes: 2 additions & 2 deletions
4
...vice/urlshortener/cache/CacheService.java → .../com/urlshortener/cache/CacheService.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
2 changes: 1 addition & 1 deletion
2
...rlshortener/common/entity/BaseEntity.java → ...rlshortener/common/entity/BaseEntity.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
29 changes: 29 additions & 0 deletions
29
src/main/java/com/urlshortener/common/response/ResponseDto.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,29 @@ | ||
package com.urlshortener.common.response; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
|
||
import java.io.Serializable; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class ResponseDto<T> implements Serializable { | ||
private T data; | ||
|
||
public static <T> ResponseEntity<ResponseDto<T>> ok(T data) { | ||
return ResponseEntity.ok(new ResponseDto<T>(data)); | ||
} | ||
|
||
public static <T> ResponseEntity<ResponseDto<T>> created(T data) { | ||
return ResponseEntity.status(HttpStatus.CREATED).body(new ResponseDto<T>(data)); | ||
} | ||
|
||
public static ResponseEntity<Void> noContent() { | ||
return ResponseEntity.status(HttpStatus.NO_CONTENT).build(); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...lshortener/config/database/JpaConfig.java → ...lshortener/config/database/JpaConfig.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
2 changes: 1 addition & 1 deletion
2
...hortener/config/database/RedisConfig.java → ...hortener/config/database/RedisConfig.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
2 changes: 1 addition & 1 deletion
2
...ner/config/scheduler/SchedulerConfig.java → ...ner/config/scheduler/SchedulerConfig.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
5 changes: 3 additions & 2 deletions
5
...ce/urlshortener/config/web/WebConfig.java → ...om/urlshortener/config/web/WebConfig.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
9 changes: 4 additions & 5 deletions
9
...ortener/error/GlobalExceptionHandler.java → ...ortener/error/GlobalExceptionHandler.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
2 changes: 1 addition & 1 deletion
2
.../urlshortener/error/dto/ErrorMessage.java → .../urlshortener/error/dto/ErrorMessage.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
2 changes: 1 addition & 1 deletion
2
...shortener/error/dto/ErrorResponseDto.java → ...shortener/error/dto/ErrorResponseDto.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
4 changes: 2 additions & 2 deletions
4
...er/error/exception/BusinessException.java → ...er/error/exception/BusinessException.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
4 changes: 2 additions & 2 deletions
4
...r/exception/InvalidJsonDataException.java → ...r/exception/InvalidJsonDataException.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
11 changes: 11 additions & 0 deletions
11
src/main/java/com/urlshortener/error/exception/health/ExampleException.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,11 @@ | ||
package com.urlshortener.error.exception.health; | ||
|
||
|
||
import com.urlshortener.error.dto.ErrorMessage; | ||
import com.urlshortener.error.exception.BusinessException; | ||
|
||
public class ExampleException extends BusinessException { | ||
public ExampleException(ErrorMessage message) { | ||
super(message); | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
...inishRemoveSixMonthsOldDataException.java → ...inishRemoveSixMonthsOldDataException.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
10 changes: 10 additions & 0 deletions
10
src/main/java/com/urlshortener/error/exception/url/NotFoundUrlException.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,10 @@ | ||
package com.urlshortener.error.exception.url; | ||
|
||
import com.urlshortener.error.dto.ErrorMessage; | ||
import com.urlshortener.error.exception.BusinessException; | ||
|
||
public class NotFoundUrlException extends BusinessException { | ||
public NotFoundUrlException(ErrorMessage message) { | ||
super(message); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/urlshortener/error/exception/url/RateLimitExceededException.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,11 @@ | ||
package com.urlshortener.error.exception.url; | ||
|
||
import com.urlshortener.error.dto.ErrorMessage; | ||
import com.urlshortener.error.exception.BusinessException; | ||
|
||
public class RateLimitExceededException extends BusinessException { | ||
|
||
public RateLimitExceededException(ErrorMessage message) { | ||
super(message); | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...alth/controller/ViewHealthController.java → ...alth/controller/ViewHealthController.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
8 changes: 4 additions & 4 deletions
8
...imit/interceptor/ClientIdInterceptor.java → ...imit/interceptor/ClientIdInterceptor.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
2 changes: 1 addition & 1 deletion
2
...r/ratelimit/service/RateLimitService.java → ...r/ratelimit/service/RateLimitService.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
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
Oops, something went wrong.