IDE

    [eclipse] error running Gradle test : No matching tests found in any candidate test task.

    스프링부트 TDD를 공부하던 와중 에러가 발생했다. 단순한 test 코드였는데 run을 해도 아무런 변화가 생기지 않았다. 자세히 살펴보니 terminated가 떠있는걸 발견할 수 있었고, 사람들이 말하는 빨간줄과 초록줄도 보이지 않았다.. 그래서 gradle test를 해보니 No matching tests found in any candidate test task. 에러 해결 1. junit5 의존성 추가하기 스프링부트 2.2x 이상부터는 junit4가 아닌 junit5를 사용해야 한다고 한다. 마구잡이식으로 의존성을 추가했던터라 junit4가 추가되어 있었다! 다시 junit5로 추가해주었다. 그래도 run이 되지 않았다... 2. org.junit.jupiter 패키지 사용하기 이전에 junit4..

    [eclipse] The operation is not applicable to the current selection. Select a field which is not declared as type variable or a type that declares such fields. 에러 해결

    [eclipse] The operation is not applicable to the current selection. Select a field which is not declared as type variable or a type that declares such fields. 에러 해결

    eclipse 에서 getter / setter 를 자동 생성해주는 기능을 사용하려 할 때 해당 에러를 만날 때가 있다. The operation is not applicable to the current selection. Select a field which is not declared as type variable or a type that declares such fields. 이는 올바른 포커스에서 기능을 사용하지 않았기 때문이다. 필자처럼. .class 내부가 아닌 외부로 선택되어져 있는 경우 getter와 setter의 자리가 올바르지 않은 경우이다. 제대로 포커스를 맞추고 실행하도록 하자 ^^

    [eclipse] An error has occurred. See error log for more details. java.lang.NullPointerException

    [eclipse] An error has occurred. See error log for more details. java.lang.NullPointerException

    이클립스가 XML 예제 프로젝트를 import하자 어떤 파일을 누르든 에러가 뜨면서 진행할 수 없었다. ​An error has occurred. See error log for more details. java.lang.NullPointerException 구글링을 해보니 저러한 에러가 나온 원인은 '이클립스가 프로젝트의 경로를 확인할 수 없어서' 라는 정도로 해석했는데 ​ 해결 방안 프로젝트 > .metadata .plugins 폴더의 모든 파일 삭제 그래도 안된다면 -> 프로젝트 . metadata의 모든 디렉토리를 삭제 ​ 나는 이걸로도 해결하지 못했다. ​ 그러다가 문득 경로 이야기가 나와 내 프로젝트 경로를 확인해보았고 특수문자와 한글이 있었던 폴더명들을 다 영어로 바꿔버린 후 이클립스를 재실..

    [eclipse] 프로젝트 유형 변경하기

    [eclipse] 프로젝트 유형 변경하기

    프로젝트를 진행하며 기존에 Static Project 유형으로 생성했어서 JSP 파일을 생성하지 못했다. 따라서 프로젝트 유형을 바꿔줘야 했는데 방법은 간단하다. * Gradle이나 Maven, Spring 프로젝트로도 유형 변경이 가능하다. 단, 관련 플러그인이 설치되어 있어야 한다. - 해결 방법 프로젝트명 마우스 우클릭 - Configure - 원하는 유형 선택

    [eclipse/github] nothing to fetch 에러

    [eclipse/github] nothing to fetch 에러

    이클립스에서 git을 사용해 Pull 해오려다가 Nothing to fetch 에러가 발생했다. 해당 프로젝트의 remote에 fetch가 안 잡혀 있어서 발생하는 에러이다. 해결 방법 1. Git Repositories 탭에서 git 프로젝트 마우스 우클릭 -> [Properties] 2. [Configuration] - remote>origin 에 fetch 항목이 있는지 확인한다. 해당 에러는 fetch가 없기 때문에 발생하므로 아마 없을 것이다. 필자는 항목을 추가한 후 캡처한 것이다! 3. fetch 를 추가한다. [Add Entry] - 다음과 같이 입력한다. Key: remote.origin.fetch Value: +refs/heads/*:refs/remotes/origin/* 4. Appl..

    [eclipse] Editor does not contain a main type 에러 해결

    [eclipse] Editor does not contain a main type 에러 해결

    원인 - 자바 클래스 파일이 src 폴더에 있지 않다. - 클래스 파일을 감싸는 패키지가 아예 없다(default 패키지조차 없음) - 프로젝트를 다른 데에서 불러왔다 - main 함수에 오타가 있다. 해결 - src 폴더를 만들어 주거나 패키지를 만들어 넣어 준다. - 오타를 수정한다. public static void main(String[] args)