-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 맛집 상세 정보 API 고도화 작업 #51
Open
jooda00
wants to merge
21
commits into
main
Choose a base branch
from
feature/map-details-advance
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
592bc0a
feat: redis config 파일 작성 (#38)
jooda00 b0fb05d
chore: LocalDateTime 타입 직렬화 / 역직렬화 dependency 추가 (#38)
jooda00 d5710bf
feat: ReviewRating 값 가져오기 위한 @Getter 추가 (#38)
jooda00 88640ef
feat: LocalDateTime 타입 직렬화 / 역직렬화 어노테이션 추가 (#38)
jooda00 caf8b6d
feat: RestaurantService의 getRestaurantDetails에 캐싱 작업 추가 (#38)
jooda00 34012c3
feat: JSON -> Point 역직렬화 클래스 추가 (#38)
jooda00 27785cb
feat: redis config 파일에 objectMapper 메소드 추가 (#38)
jooda00 7ed208e
feat: Restaurant 클래스에 location 역직렬화 어노테이션 등록 (#38)
jooda00 754d028
refactor: RestaurantDetailRes 좌표 반환 형식 double x, double y -> Point 객체…
jooda00 a23f297
refactor: objectMapper 시용해서 redis에 저장된 restaurant 타입 객체 받아오기 (#38)
jooda00 002481b
style: 주석 제거 (#38)
jooda00 38e575f
fix: log 메세지 수정 (#38)
jooda00 d983d49
Merge branch 'main' into feature/map-details-advance
jooda00 a310430
feat: main 브랜치와 충돌 해결
jooda00 c839c13
Merge remote-tracking branch 'origin/feature/map-details-advance' int…
jooda00 071fc56
Merge branch 'main' into feature/map-details-advance
jooda00 7089158
Merge branch 'main' into feature/map-details-advance
jooda00 854f98a
feat: main 브랜치 pull 작업
jooda00 09b5a08
Merge remote-tracking branch 'origin/feature/map-details-advance' int…
jooda00 ea2be7c
feat: application-template.yml redis 설정 추가 (#38)
jooda00 d945e52
feat: ci pipeline redis 환경변수 추가 (#38)
jooda00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,47 @@ | ||
package oz.yamyam_map.core.config; | ||
|
||
import org.locationtech.jts.geom.Point; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.data.redis.connection.RedisConnectionFactory; | ||
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; | ||
import org.springframework.data.redis.core.RedisTemplate; | ||
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; | ||
import org.springframework.data.redis.serializer.StringRedisSerializer; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.fasterxml.jackson.databind.module.SimpleModule; | ||
|
||
import oz.yamyam_map.common.util.GeoUtils; | ||
|
||
@Configuration | ||
public class RedisConfig { | ||
@Value("${spring.data.redis.host}") | ||
private String redisHost; | ||
@Value("${spring.data.redis.port}") | ||
private int redisPort; | ||
|
||
@Bean | ||
public RedisConnectionFactory redisConnectionFactory() { | ||
return new LettuceConnectionFactory(redisHost, redisPort); | ||
} | ||
|
||
@Bean | ||
public ObjectMapper objectMapper() { | ||
ObjectMapper mapper = new ObjectMapper(); | ||
SimpleModule module = new SimpleModule(); | ||
module.addSerializer(Point.class, new GeoUtils.PointSerializer()); | ||
mapper.registerModule(module); | ||
return mapper; | ||
} | ||
|
||
@Bean | ||
public RedisTemplate<String, Object> redisTemplate() { | ||
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>(); | ||
redisTemplate.setConnectionFactory(redisConnectionFactory()); | ||
redisTemplate.setKeySerializer(new StringRedisSerializer()); | ||
redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer(objectMapper())); | ||
return redisTemplate; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
import lombok.Getter; | ||
|
||
@Embeddable | ||
@Getter | ||
public class ReviewRating { | ||
|
||
private Long totalReviews; | ||
|
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍