📚 개발백과
-
[Spring] 유효성 검사에서 @Valid 와 setField 중 무엇이 먼저 실행될까📚 개발백과 2024. 8. 8. 14:41
public class RequestDto { @Getter public static class BaseInfo { @Schema(description = "유저의 계좌 id", example = "123456789012") @NotNull(message = "계좌번호 입력은 필수입니다.") @TrimmedSize(value = 12, message = "계좌번호는 12자리이어야 합니다.") private String accountId; private void setAccountId(String accountId){ this.accountId = (accountId != null) ? accountId.trim..
-
[Naver Cloud] SSL 인증서 中 Chrome 호환성 정리 (2024.08 기준)📚 개발백과 2024. 8. 4. 22:14
구글 크롬에 NAVER Cloud Trust Services의 루트 인증서가 기본 설치되어있는 버전을 알아본다.(2024.08.04 기준)공식문서에 따르면 크롬 102부터 인증서가 지원된다고 하는데 125버전에서 접속이 차단되는 것을 확인했기에 글을 작성한다. NCP 인증서 호환성 이슈 시 증상NAVER Cloud Trust Services의 루트 인증서가 기본 설치되지 않은 운영체제 및 소프트웨어 버전을 이용하는 경우SSL/TLS 인증서를 신뢰할 수 없는 인증서로 판단하여 웹사이트, 애플리케이션, API로 통신할 때 접속이 차단되거나 오류가 발생할 수 있다. 참고https://guide.ncloud-docs.com/docs/certificatemanager-troubleshooting-certific..
-
[TWA] 웹으로 구현한 FCM을 앱에서 띄우기📚 개발백과 2024. 8. 4. 13:11
부제: Trusted Web Activity(TWA) 까지 오는데 너무 많은 시행착오들 웹으로 구현한 FCM을 앱으로도 띄우고 싶어요안드로이드 웹앱 구현하면 WebView? 쓴다던데?.. 웹뷰에서 알림 권한 받고 fcm 띄우고 싶어요.. 결론부터 말하자면, 웹뷰(WebView) 로는 불가능하다. 웹뷰를 쓸거면 네이티브 로직을 따로 구현해야 한다! 사실 웹뷰를 꼭 써야하는 건 아니다! 어떻게 하는지나 알려달라 --> 유레카: Trusted Web Activity (이하 twa)부터 보기 웹뷰에서는 웹으로 구현한 fcm을 진.짜. 살릴 수 없는지 궁금하다 --> 처음부터 ❌ 시도 1: 웹뷰 참고로 주인장은 안드로이드에 대한 지식이 없다고봐도 무방할 정도였다. 안드로이드 웹앱 구현하면 WebView 를 ..
-
2의 보수는 왜 쓰는 걸까?📚 개발백과 2024. 7. 28. 23:57
Binary Indexed Tree 에서 bit 연산을 하며 2의 보수 개념을 사용하는데왜전산학의 정수 표현법에서 2의 보수가 가장 널리퍼진 방식인지 궁금해졌다. 라고 했으나 사실 2년전쯤 컴기초수업에서 들은 게 기억이 안난 것일지도 2의 보수는 2진수 표현 방식 중 하나이다. 2진수 표현 방식들은 다음과 같다.* 부호화 절대값* 1의 보수* 2의 보수 2진수 표현방식이 채택된 이유- 라 함은다시 말해 부호화 절대값과 1의 보수의 단점을 극복한, 2의 보수만의 특별한 이유가 있기 때문이다. 이는 바로 "0의 표현방식이 한 가지뿐(0000)" 이다. 0의 표현 방식이 하나가 아니라면 연산 중에 불필요한 복잡성이 추가된다. 말 안해도 알겠지만, 이는 결과의 정확성을 해칠 수 있고 오류를 유발할 수 ..
-
[Git] git filter-repo로 올리면 안되는 파일기록 말소하기📚 개발백과 2024. 6. 24. 16:06
상황:DB data 가 들어있는 data 파일을 원격 저장소에 푸쉬했다. 파일구조:.├── Dockerfile├── build├── build.gradle├── data ⬅️ ‼️├── docker-compose.yml├── gradle├── gradlew├── gradlew.bat├── readme.md├── settings.gradle└── src 참고:data 디렉토리는 커밋 후 수정한 적이 없고 다른 폴더와 연관관계가 없다. 해결: 1. git filter-repo 설치brew install git-filter-repo 2. 선택 1) 안전한 방법# 새로운 클론 생성git clone https://your-repo-url.gitcd your-repo-name# git filter-repo ..
-
[NCP, Docker] 왜 내 서버 Disk 사용량이 90퍼?📚 개발백과 2024. 5. 30. 01:30
상황:NCP console 들어갔다가 디스크 사용량이 90%라는(;) 숫자를 봄 항상 40퍼대를 유지했는데 오늘 오후 3시경부터 증가하더니 발견한 시점인 당일 오후 10시 반에는 90프로를 찍음결론부터 말하자면 로그파일 하나가 24G 나 잡아먹고 있었다. 원인 분석하는 방법부터 시작 0. 해당 서버에 접속부터 한다. 1. docker prune (각자 상황에 맞게.. 중요한건 보호하면서 삭제하길)$ docker volume prune$ docker system prune -a등등 난 현재 실행중인 컨테이너 제외하고 모든 데이터를 삭제했는데도 4G 밖에 삭제되지 않았다. 그럼 이 문제는 아니다. 2. 도커 디렉토리와 그 직속 하위 디렉토리들의 디스크 사용량을 확인하고, 그 결과를 크기에 따라 내림차순으로..
-
[GitHub Action, Docker, SSH] application.yml 에 환경변수 많은데 어떻게 하지📚 개발백과 2024. 5. 27. 04:43
선 코드 후 설명jobs: build: steps: - name: Deploy to server uses: appleboy/ssh-action@master with: host: ${{ secrets.HOST_BANK }} username: ${{ secrets.HOSTNAME_BANK }} password: ${{ secrets.SSH_BANK_PWD }} script: | docker pull ${{ secrets.DOCKER_REPO_BANK }} cd EUM-Bank-docker echo "${{ secrets.BANK_ENV }..
-
[GitHub Action] Error_command not found: docker📚 개발백과 2024. 5. 27. 04:26
상황:깃헙 핵션 호스트 러너를 맥으로 설정, steps 에는 문제Xjobs: build: runs-on: macos-14 (작성시점에서 latest 와 동일) 공지:macOS 인 호스트러너에 도커 엔터프라이즈 지원이 안됨.라이센스 문제인듯 해결:우분투로 변경 꼭 맥을 써야한다면 jobs: job: runs-on: macos-latest steps: - run: | brew install docker colima start docker run -e [...]이렇게라도 사용해야..난 굳이..? 라서 그냥 우분투로 변경 참고:https://stackoverflow.com/questions/76488238/runni..