[PS][SpringBoot] non-compatible bean definition of same name and class - 중복된 패키지 문제
2023. 10. 3. 00:19
Problem Solving
해결 방법 패키지만 다르고 파일명이 똑같은지 확인할 것 (해당 포스트에선 이 방법 사용) Bean 고유 이름 명시할 것 패키지 이름까지 포함하여 Bean 등록할 것 문제 해결 흐름 게시글저장_불러오기() 테스트를 진행하려 하는데 자꾸 `non-compatible bean definition of same name and class` 오류가 뜨길래 천천히 읽어보니, 파일명은 같은데 패키지가 다른 게 있다고 그런다. 패키지들을 다시 한번 보니 domain.posts가 2개 있었다... 그래서 삭제하고 수정하니 해결 되었다. 참고 1. https://blog.naver.com/mering_k/222423540639https://codingdiary99.tistory.com/5
[PS][SpringBoot] Unable to find a @SpringBootConfiguration
2023. 9. 20. 00:21
Problem Solving
해결 방법 SpringBoot를 실행시키는 main 메소드 + 테스트로 만들어둔 클래스의 패키지 경로 확인 @SpringBootApplication 클래스의 적정 위치를 패키지 최상단으로 옮기기 참고 1. https://jjunii486.tistory.com/172
[PS][SpringBoot] 테스트 코드의 404 - 경로 문제
2023. 9. 13. 02:52
Problem Solving
해결 방법 SpringBoot를 실행시키는 main 메소드 + 테스트로 만들어둔 클래스의 경로 확인하기 둘 다 같은 패키지에 있어야 404 에러 뜨지 않음 문제 해결 흐름 `스프링 부트와 AWS로 혼자 구현하는 웹 서비스` 책을 보며 테스트 코드를 작성하고 있었다. 테스트 메소드를 실행시키면 테스트 통과, 즉 200 이 뜰거라고 했는데 자꾸 404가 떴다. 저자의 깃허브 이슈탭을 보니 `build.gradle` 에서 security 문제이다, get()에서 hello 가 아닌 /hello 를 써야 한다 등 여러가지 답이 많았지만 나와 해당이 되지 않았고, 다시 구글창에 검색을 해보았다. 이리저리 찾던 중 https://codu.tistory.com/25 의 글을 보게 되었고 해당 글에서 문제를 발견하게 ..
[PS][Git] 따로 떨어져나온 커밋? - Merge
2023. 6. 29. 02:05
Problem Solving
해결 방법 복구 시키려면 Rebase 사용하기 문제 해결 흐름 1. 6월 28일에 '이것이 자바다' 시작함과 동시에 git 유저 등록을 새로 했다. (Namani31 -> Namani) 2. 오늘 이어서 공부하면서 커밋 찍고 푸쉬 함 3. 충돌 뜨길래 머지 시켰더니 저렇게 따로 떨어져나온 걸 확인 4. 친구에게 물어보니 "저 표시는 다른 브랜치로 갔다가 메인으로 머지됐다는 표시이다" 라고 답변 얻음 5. 리베이스하면 해결할 수 있겠지만 거슬리기만 하고 실습에 문제는 없어서 냅두고 기록하기로 함
[PS][Git] Gitlab 에서 Github 로 저장소 옮기기 + commit 유지
2023. 6. 9. 01:56
Problem Solving
방법 터미널 켜거나 Git bash 켜기 원본 저장소 복사 (Github 로 옮길 원본 Repository 주소) git clone --mirror [원본 레포지토리 경로] 해당 폴더 안으로 이동 cd [원본 저장소 이름].git Github 에 Repository 를 새로 한개 만들고, 이동할 원격 레포지토리 주소 넣기 git remote set-url --push origin [이동할 원격 레포지토리 주소] push 하기 git push --mirror 출처 1. https://jennnn.tistory.com/86