Skip to content

Conversation

@hodoon
Copy link
Collaborator

@hodoon hodoon commented Feb 12, 2025

[feat] google API 연동

#14

변경 내용

  • 부원 모집 시 신청서 폼을 받고 구글 스프레드 시트와 연동
  • Error Code C011 추가
  • 예외처리 부분 RuntimeException -> CustomExecption 으로 변경
  • google spreadsheet id 설정파일에서 관리하도록 변경

구현 사항

  • Google Sheets API와 인증 관련 라이브러리 Gradle 의존성 추가
  • Google Sheets 서비스 객체 구현
  • Google API Controller 구현

@hodoon hodoon added the FEAT label Feb 12, 2025
@hodoon hodoon requested review from dohy-eon and ysw789 February 12, 2025 02:45
@hodoon hodoon self-assigned this Feb 12, 2025

private final GoogleApiService googleApiService;

private static final String SPREADSHEET_ID = "1Vpu6_2raNvJN_GGg7aGBmzV4cXG1rCoizHl9v7kbG2o";
Copy link
Member

Choose a reason for hiding this comment

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

SPREADSHEET_ID도 .yml로 관리하세요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

확인이여

@RestController
@RequestMapping("/google")
@RequiredArgsConstructor
public class GoogleController {
Copy link
Member

Choose a reason for hiding this comment

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

이 컨트롤러 클래스는 어디에 사용되는 건가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

아직 지원자 컨트롤러가 없어서 만들었습니다. 추후 recruit 컨트롤러 만들어지면 그쪽으로 옮길예정입니다.

.update(spreadsheetId, range, body)
.setValueInputOption("USER_ENTERED")
.execute();
logger.info("Updated rows: {}", result.getUpdatedRows());
Copy link
Member

Choose a reason for hiding this comment

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

Logger는 @Slf4j 사용하면 간편할듯요

Copy link
Member

@dohy-eon dohy-eon left a comment

Choose a reason for hiding this comment

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

gosu

@hodoon hodoon merged commit c7a82b7 into dev Feb 12, 2025
1 check passed
@hodoon hodoon deleted the feat/#14-1 branch February 12, 2025 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants