분류 전체보기
-
[GitHub Action] ".github/workflows 는 최상단에 둔다"🩸 삽질의 추억 2024. 5. 27. 04:12
상황_프로젝트 구조:rootㄴ SpringBootProject ㄴ src/main ..ㄴ README.mdㄴ .gitignore 즉, spring boot project != repository 인 상황이다. 그래도 항상 .github/workflows 는 최상단에 둔다-> root/.github/workflow/deploy.yml 삽질: 처음엔 프로젝트 파일 안에 뒀음..root/springBootProjectName/.github/workflows/deploy.yml
-
[.gitignore] 예외 처리 안됨🩸 삽질의 추억 2024. 5. 27. 04:04
상황: *.jar 은 커밋 안되게 하고 싶은데!gradle/wrapper/gradle-wrapper.jar 는 커밋되게 하고 싶음근데 룰이 안지켜짐 계속 파일이 ignore 됨(인텔리제이에서 갈색표시) // .gitignore !gradle/wrapper/gradle-wrapper.jar *.jar 해결: gitignore 는 마지막에 작성한 룰이 이전 룰을 덮는다. *.jar !gradle/wrapper/gradle-wrapper.jar 순서를 잘 지킵시다 반대로 적으면(내 처음 상황) *.jar 가 예외를 덮어버림.따라서 예외는 전체룰을 적은 다음에 작성하자 삽질한 이유:다른 사람이 했던 프로젝트였음.. 이전엔 잘 돌아가는 듯해서 당연히 이쪽엔 문제 없을거라 생각;
-
[CaffeineCache] "RemovalListener 는 GC가 실행된 이후 호출된다."🩸 삽질의 추억 2024. 5. 15. 02:04
상황:RemovalListener 가 NullpointerException을 뱉음2024-05-14T09:09:09.130Z WARN 1 --- [] [onPool-worker-6] c.g.b.caffeine.cache.BoundedLocalCache : Exception thrown by removal listener java.lang.NullPointerException: Cannot invoke "java.util.Queue.size()" because "messageQueue" is null @Bean public Cache> chatCache() { RemovalListener> listener = (String key, ConcurrentLinkedQueue queue..
-
[NCP, MongoDB] 인스턴스 랜섬웨어 감염🩸 삽질의 추억 2024. 5. 14. 13:32
목차상황사건의 발단구체적인 상황들추측해결그 외 트러블슈팅상황: 사건의 발단팀원들로부터 디비 밀었냐는 연락을 받음 --> 안밀었는데?스택오버플로우 검색해보니 index에 expireDate 설정하는게 있다고함 --> 그런거 안했는데?이상하군. 하고 디비랑 컬렉션 다시 만듦몇시간 뒤에 들어가보니까 또 없어져있음Gui 로 접속해보니 못보던 디비 발견비트코인 내노란다..랜섬웨어다.. 구체적인 상황1-1. 해당 서버 접속할 땐 공유 와이파이 사용 한 번도x 계속 집 와이파이로만 개발. 1-2. private team repo 에서 작업1-3. 나 포함 모든 팀원이 ssh pem 키나 비밀번호를 어디 유출하거나 올린적이 없음.1-4. 여러 인스턴스가 있고 여러 스프링부트프로젝트와 몽고디비, mysql, red..
-
[CaffeineCache] caffeineCacheManager iter, .toMap() 안됨🩸 삽질의 추억 2024. 5. 11. 13:25
상황:caffeineCacheManager 로 구현한 캐시를 순회할 일이 있는데 순회를 못함. 애초에 .toMap() 으로 접근이 안됨. 해결:caffeineCacheManager 가 아닌 직접 Cache 로 CaffeineCache 를 구현한다. 설명CaffeineCacheManager은 스프링의 CacheManager 인터페이스를 통해 캐시를 관리한다이 인터페이스는 Cache 인터페이스를 통해 제공되는 표준 기능들을 사용할 수 있지만 Caffeine의 asMap() 메서드와 같은 구체적인 메서드에 접근할 수 없다. 이는 CacheManager와 Cache 인터페이스가 캐시의 구현 세부 사항을 추상화하고 일반화하여 다양한 캐시 구현체와 호환될 수 있도록 설계되었기 때문이다. 따라서 직접 Caffein..
-
[NCP, Spring Boot] NCP 로 HTTPS, SSL, 서브도메인 적용하기🩸 삽질의 추억 2024. 5. 7. 01:18
이 글의 목표:스프링부트 프로젝트에 https 를 적용한다.NCP 로 ~+ 서브도메인 적용 상황도메인은 이미 있었다. 그리고 다른 서비스에서 www.blahblah.com 을 사용하고 있었고,내 서비스에도 https 적용이 필요했다.(웹소켓) 따라서 서브도메인을 적용하기로 했다. 1. Certificate List 인증서 발급 버튼 을 누른다.Certificate 이름은 내가 부를 이름, 도메인 이름은 내가 사용할 이름이다. 나는 채팅서비스였고, 서브도메인이라 chat.blahbla.com 을 썼다.검증 방식은 DNS 방식으로 한다. 신청완료를 하면 아직 상태가 노란색이다. 나는 이미 발급받았으니까 초록색인겨여기서 Record Name 과 Record Value 를 복붙한다.그리고 나서 GLOBAL ..
-
[Spring Boot] Multiple DataBases 를 사용하는 환경에서 table이 자동으로 생성되지 않음(ddl-auto)🩸 삽질의 추억 2024. 4. 20. 14:54
상황: - Spring boot 3.2.x 사용 - MySQL DB 두개 사용. 다중 데이터베이스 환경 - application.yml 에 작성한 내용: hibernate: ddl-auto: create (update, create-drop 모두 안됨) - 각 DBConfig 마다 적은 내용의 일부 @Bean public LocalContainerEntityManagerFactoryBean bankCoreEntityManager() { LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean(); entityManagerFactoryBean.setDataSource(b..