Skip to content
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 구현 및 Kafka 설정 변경 #102

Merged
merged 5 commits into from
Jun 1, 2024

Conversation

seheonnn
Copy link
Contributor

☝️Issue Number

🔎 Key Changes

  • 지역 변환 api 구현
  • Kafka 설정 변경

💌 To Reviewers

@seheonnn seheonnn requested review from jinho7 and DDonghyeo May 30, 2024 14:37
@seheonnn seheonnn self-assigned this May 30, 2024
Copy link
Member

@DDonghyeo DDonghyeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다 😂

@@ -14,14 +14,20 @@

@RequiredArgsConstructor
@RestController
@RequestMapping("/weather")
@RequestMapping("/api/v1/weather")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

헉 이거 일부러 /weather로 바꿔놨습니다...

api-gateway에서 prefix를 /weather 로 해놔서...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 제가 잘못 바꾼 줄 ㅋㅋ
변경하겠습니다

public record GetWeatherRequest(
@NotBlank(message = "[ERROR] 위도 입력은 필수 입니다.")
Copy link
Member

@DDonghyeo DDonghyeo May 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 Validation 대한민국 내 위도/경도 받는건 어떨까요??

@NotBlank(message = " 위도(lat) 값은 필수입니다.")
    @DecimalMax(value = "132.0", inclusive = true, message = "위도(lat)는 대한민국 내에서만 가능합니다.")
    @DecimalMin(value = "124.0", inclusive = true, message = "위도(lat)는 대한민국 내에서만 가능합니다.")
    public double lat;

    @NotBlank(message = " 경도(y) 값은 필수입니다.")
    @DecimalMax(value = "43.0", inclusive = true, message = "경도(lon)는 대한민국 내에서만 가능합니다.")
    @DecimalMin(value = "33.0", inclusive = true, message = "경도(lon)는 대한민국 내에서만 가능합니다.")
    public double lon;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위도 경도 받는 api들 모두 적용하겠습니다~!

@@ -31,38 +34,47 @@ public class KafkaConfig {
@Value("${spring.kafka.consumer.group-id}")
private String groupId;

@Bean
public ProducerFactory<String, String> producerFactory() {
private <T> ProducerFactory<String, T> producerFactory(Class<T> valueClass) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제네릭 타입 좋네요. 저도 이용해야겠습니다 !!!

@seheonnn seheonnn merged commit 631cd3a into develop Jun 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ feat : 지역 api 구현 및 Kafka 설정 변경
2 participants