GithubHelp home page GithubHelp logo

Comments (58)

jojoldu avatar jojoldu commented on September 23, 2024 57

@ssooya90 아! 아닙니다 p.11에서 개발환경에 그레들 4.8 이라고 명시를 했는데요.
이 부분을 본문에 넣지 않고, 도입부에 넣어서 못보셨을것 같습니다 ㅠ

그레들 버전 다운그레이드는 다음과 같이 진행하시면 됩니다.

image

인텔리제이에서 alt+F12 (윈도우/맥 동일) 누르시면 해당 프로젝트 기준으로 터미널이 열리는데요.
거기서 아래와 같이 명령어를 실행하시면 됩니다.

gradlew wrapper --gradle-version 4.10.2

from freelec-springboot2-webservice.

dkyou7 avatar dkyou7 commented on September 23, 2024 20

이슈 : 롬복 테스트 실패

해결 방법 :

  1. alt+F12 (윈도우/맥 동일) 키로 해당 프로젝트 기준으로 터미널 생성
  2. gradlew wrapper --gradle-version 4.10.2

로 그래들 다운시켜주기

감사합니다! 책 잘 보고있어요.
저자님 만수무강 행복 꽃길만 걸으세요~~~! 꼭 끝까지 정독해서 웹 서비스 하나 만들게요^__^

from freelec-springboot2-webservice.

IMHOJEONG avatar IMHOJEONG commented on September 23, 2024 7

저도 같은 문제 였는데 덕분에 해결 했습니다. 감사합니다!

매우 간단한 부분이지만, 윈도우에선 앞의 ./ 빼주어야 적용되는 거 같아요 ㅎㅎ;;

gradlew wrapper --gradle-version 4.10.2 

그리고 74 페이지의 그림 2-29 부분이 HelloControllerTest의 테스트 결과 화면인데,
HelloResponseDtoTest.롬복_기능_테스트 메소드의 결과화면 이미지가 되어야 한다고 생각해요.

from freelec-springboot2-webservice.

jojoldu avatar jojoldu commented on September 23, 2024 6

@loverman85 안녕하세요 :)
일단 그레이들 5에서는 롬복을 비롯해서 Querydsl 등의 플러그인들이 모두 설정 방법이 변경되었습니다.
그러다보니 해당 플러그인들을 쓰기 위해서는 새로운 방식으로 설정을 해야하는데요 :)
아직 많은 자료들이 그레이들4로 된게 인터넷에 많다보니, 이후에 추가적인 플러그인들이나 그레이들 설정시 참고하시기 편하게 그레이들4로 책에선 선택하였습니다.

from freelec-springboot2-webservice.

Pigrabbit avatar Pigrabbit commented on September 23, 2024 4

@donghak0205 같은 환경에서 같은 에러가 발생했습니다.
gradle/wrapper/gradle-wrapper.properties 에서 distributionUrl의 값을 https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip 와 같이 바꿔주고 gradle을 refresh하였더니 정상적으로 downgrade 되었습니다.

image

from freelec-springboot2-webservice.

jojoldu avatar jojoldu commented on September 23, 2024 2

@benny-coding 아고 ㅠㅠ 그레이들 버전 문제가 생각보다 크네요!
잘 봐주셔서 고맙습니다! ㅠㅠ

from freelec-springboot2-webservice.

cellenar26 avatar cellenar26 commented on September 23, 2024 2

gradle 다운그레이드 이후,
https://jojoldu.tistory.com/450
이렇게 설정 적용 한 번 해보세요.
저는 gradle 다운그레이드 했는데도 문제 해결 안됐는데, 저렇게 설정하니 바로 해결됐습니다.

from freelec-springboot2-webservice.

hjeomdev avatar hjeomdev commented on September 23, 2024 2

다운그레이드 했는데도
variable name not initialized in the default constructor
오류가 떠서 build.gradle에
annotationProcessor("org.projectlombok:lombok")
추가했더니 됐습니다.
감사합니다.

from freelec-springboot2-webservice.

hohyunjun avatar hohyunjun commented on September 23, 2024 2

저는 아래와 같은 메시지의 에러가 났었는데, 구글링 하다보니 jdk16 과 롬복과의 호환 관련된 문제였습니다.
java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x6f3d6636) ~

결론적으로, 롬복을 1.18.20으로 명시해 주었더니 문제 해결되었습니다.
build.gradle 에서 dependencies 를 아래와 같이 수정하였습니다.

dependencies {

implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.projectlombok:lombok')
annotationProcessor('org.projectlombok:lombok:1.18.22')
//annotationProcessor('org.projectlombok:lombok')
testImplementation 'junit:junit:4.13.1'
testImplementation('org.springframework.boot:spring-boot-starter-test')

}

from freelec-springboot2-webservice.

jojoldu avatar jojoldu commented on September 23, 2024 1

혹시나 안되시면 말씀주세요!

from freelec-springboot2-webservice.

seolryuhee avatar seolryuhee commented on September 23, 2024 1

저도 같은 문제였는데 덕분에 해결 되었네요!!
저 또한 community로 진행했었고 gradle 버전 이슈가 있었습니다.
@IMHOJEONG 윈도우에서의 명령어 알려주셔서 감사합니다!
윈도우 환경에서 명령어 따라했었는데 실행이 안 돼서 내가 뭘 또 잘못했나 고민하고 있었네요ㅠ

from freelec-springboot2-webservice.

iyhong avatar iyhong commented on September 23, 2024 1

안녕하세요.
책은 잘보고 있습니다 너무 감사합니다!!
위에분들 덕분에 에러를 해결하긴하였습니다.

근데 한가지 궁금한게 gradle 5버전 부터는 에러가 왜발생될까요..?
버그인가요?? 상식대로면 잘되야 하는것 같은데ㅠㅠ lombok이 제대로 작동을 안하는건가요??
답변주시면 너무 감사하겠습니다~

from freelec-springboot2-webservice.

HoseonYim avatar HoseonYim commented on September 23, 2024 1

오 저도 비슷한 문제가 있었는데 다운그레이드 하니까 해결이 잘됬습니다!
게다가 gradle에서 버전 내리는 걸 어떻게 하는지 고민 하고 있었는데 이것을 통해 그것도 알게 되네요!

from freelec-springboot2-webservice.

isun-dev avatar isun-dev commented on September 23, 2024 1

다운그레이드하고도 동일한 현상이 나타나서 확인해보니, IntelliJ IDEA 2020.3에서는 롬복 문제로, Preferences | Build, Execution, Deployment | Compiler | Build process VM options field에 -Djps.track.ap.dependencies=false 를 추가해야 정상작동이 된다고 하여, 추가 후 테스트 정상적으로 됐습니다!

from freelec-springboot2-webservice.

7loro avatar 7loro commented on September 23, 2024 1

gradle 최신 6.8 버전으로 테스트 했고, build.gradle 에 아래 dependencies 추가해주면 동작합니다.
annotationProcessor('org.projectlombok:lombok')

dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.projectlombok:lombok')
annotationProcessor('org.projectlombok:lombok')
testImplementation 'junit:junit:4.13.1'
testCompile('org.springframework.boot:spring-boot-starter-test')
testAnnotationProcessor('org.projectlombok:lombok')
}

from freelec-springboot2-webservice.

Yelin-park avatar Yelin-park commented on September 23, 2024 1

비슷한 문제가 발생했는데 해결했습니다! 감사합니다 : )

from freelec-springboot2-webservice.

jojoldu avatar jojoldu commented on September 23, 2024

오! 감사합니다 전체 코드를 볼수있따면 좋을텐데요.
해결하신 코드를 보면 아무래도 그레들 5 혹은 스프링부트 2.2를 쓰신것 같습니다! 혹시 맞으신가요?

from freelec-springboot2-webservice.

jojoldu avatar jojoldu commented on September 23, 2024

롬복 설정이 그레들 5로 되면서 많이 변경이 되었는데요.
그래서 책의 예제에서도 그레들4를 기준으로 진행했습니다
junit4와 마찬가지로 아직은 그레들4가 현업에서 많이 사용되어서 선택했는데요.

image

위와 같이 그레들 래퍼의 버전을 확인할수가 있는데
혹시 몇버전이실까요?
(위에는 제 개인 프로젝트 버전이라 5.6.4 인데요! 책의 예제를 실행하실때는 4.10.2까지 정상작동합니다!)

from freelec-springboot2-webservice.

ssooya90 avatar ssooya90 commented on September 23, 2024

distributionUrl=https://services.gradle.org/distributions/gradle-5.2.1-all.zip

으로 되어있네요.ㅜㅜ 다운그레이드 해야겠습니다.

책에서 gradle 4로 설정하는 부분이 안보이는데
제가 못 찾는 것일까요?

from freelec-springboot2-webservice.

ssooya90 avatar ssooya90 commented on September 23, 2024

잘됩니다.!
퇴근하고 오자마자 설레는 맘에 책 뜯어서 정독하면서 진행했는데요.
도입부라 미처 정독을 못한 것 같습니다.ㅜㅜㅎㅎ

기대 이상으로 책 구성이 알차서 시간 가는줄 모르고 보고 있습니다.ㅎㅎ
늦은시간 답변 감사드리고 좋은 밤 되세요.^^

from freelec-springboot2-webservice.

jojoldu avatar jojoldu commented on September 23, 2024

@ssooya90 와 다행입니다 :)
아닙니다 정독하실필요없이 본문에 버전을 명시했어야했는데 ㅠ
그레들 버전이 5 쓰시는 분들이 많으실거라 생각을 못했습니다 ㅠ
온전히 제 불찰이구요 ㅠ ssooya90 님이 알려주셔서 빠르게 이슈로 남길수있었습니다 ㅠ
감사합니다 :)

또 안되시면 편하게 남겨주세요!

from freelec-springboot2-webservice.

ssooya90 avatar ssooya90 commented on September 23, 2024

커뮤니티 버전은 사용을 안해서 잘 모르겠습니다만,
ultimate 버전에서 그래들 프로젝트 생성 시 디폴트 값이 5 버전인 것 같습니다.
그래서 미처 확인을 못한 것 같아요.^^
감사합니다.

from freelec-springboot2-webservice.

jojoldu avatar jojoldu commented on September 23, 2024

@ssooya90 아.. 네넵 ㅠ 아마 커뮤니티도 마찬가지일것 같습니다!
제가 코드 작업을 1년전에 진행했어서 당시의 기본버전과 현재가 다른것 같습니다 ㅠ
제보 감사합니다 :)

from freelec-springboot2-webservice.

jojoldu avatar jojoldu commented on September 23, 2024

@ssooya90 님 이슈 제보해주신 건에 대해서 제가 할수 있는게 새로 교정된 책을 전달드리는것 밖에 없는데요 ㅠ
제 메일 주소 [email protected]로 주소를 보내주시면 교정된 책으로 한부 전달드리겠습니다.
제보 해주셔서 정말 감사드립니다 :)

from freelec-springboot2-webservice.

benny-coding avatar benny-coding commented on September 23, 2024

저는 community로 진행 시에 gradle 버전 이슈가 있었습니다
해당 이슈에 대해 등록해주시고 답변 해주셔서 정말 감사합니다!

from freelec-springboot2-webservice.

zuctoma85 avatar zuctoma85 commented on September 23, 2024

안녕하세요 저도 책보면서 따라해 보고 있는데요
인텔리J 에서 터미널 열어서 gradlew wrapper --gradle-version 4.10.2
실행하면
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
발생하는데 저만 그런걸까요,,?
윈도우 cmd 창에서는 해보니 실행되거든요(윈도우 환경변수도 설정해 놓았습니다)

from freelec-springboot2-webservice.

jojoldu avatar jojoldu commented on September 23, 2024

@zuctoma85 님 안녕하세요!
혹시 윈도우 환경변수 어떻게 설정하셨는지 캡쳐해주시면 제가 원인 파악하는데 좀더 도움이될것같습니다!

from freelec-springboot2-webservice.

hilpoint avatar hilpoint commented on September 23, 2024

다운그레이드 하니 잘 되네요!!!

from freelec-springboot2-webservice.

zhtmr avatar zhtmr commented on September 23, 2024

73페이지에서 테스트 실패하는게 이것때문이엿군요 ㅠㅠ

from freelec-springboot2-webservice.

monkeyDugi avatar monkeyDugi commented on September 23, 2024

저도 같은 문제 해결!! 감사합니다!!

from freelec-springboot2-webservice.

gunkim avatar gunkim commented on September 23, 2024

저도 이 문제 때문에 2주 동안 삽질했는데 빨리 볼 걸 그랬네요

from freelec-springboot2-webservice.

kwonmory avatar kwonmory commented on September 23, 2024

맥 OS 카탈 기준으로 다운 그레이드하니깐 잘 됩니다.

from freelec-springboot2-webservice.

Jeonga-Yu avatar Jeonga-Yu commented on September 23, 2024

덕분에 저도 같은문제 빠르게 잘 해결했습니다! 감사합니다 :D

from freelec-springboot2-webservice.

yunsion avatar yunsion commented on September 23, 2024

저도 삽질하다가 문제 잘 해결하고 갑니다. 감사합니다!

from freelec-springboot2-webservice.

chp320 avatar chp320 commented on September 23, 2024

저도 위에 분과 같이 다운그레이드 진행 시 JAVA_HOME 오류가 발생했습니다.

  • 버전: gradle-5.2.1-all.zip
    찾아보니.. 환경변수에 2개 이상의 java가 설정되어 있거나 환경변수 내 ';'가 포함되어 있는 경우 문제가 된다고 하는데.. 현재 그렇게 설정되어 있지 않음에도 오류가 발생하네요.. ㅠㅠ
    혹시 어떤 부분인지 도움 주실 수 있을까요?? ㅠㅠ
    java_home

from freelec-springboot2-webservice.

kwj1270 avatar kwj1270 commented on September 23, 2024

덕분에 문제 잘 해결하고 갑니다 감사합니다 ㅎㅡㅎ

from freelec-springboot2-webservice.

zeraf29 avatar zeraf29 commented on September 23, 2024

잘 해결했습니다. 감사합니다 ^^

from freelec-springboot2-webservice.

Bammuri avatar Bammuri commented on September 23, 2024

덕분에 이슈를 빠르게 해결할 수 있었습니다. 감사합니다.

혹시 윈도우에서 JAVA_HOME 이슈 겪으시는 분들!!
자바 SDK 설치하시구 환경변수 설정하고 인텔리제이 재시작하고 해보시길 권해드립니다~^^

from freelec-springboot2-webservice.

ChoiSeungWon avatar ChoiSeungWon commented on September 23, 2024

window 10 환경 에서 gradlew wrapper --gradle-version 4.10.2
다운그레이드 하니 잘 작동합니다. ^^ 감사합니다.

from freelec-springboot2-webservice.

vincentkim11 avatar vincentkim11 commented on September 23, 2024

다운 그레이를 해도 아래와 같이 오류가 납니다. 아시는 분 있으실까요

MockHttpServletRequest:
HTTP Method = GET
Request URI = /hello/dto
Parameters = {name=[hello], amount=[1000]}
Headers = []
Body =
Session Attrs = {}

Handler:
Type = org.springframework.web.servlet.resource.ResourceHttpRequestHandler

Async:
Async started = false
Async result = null

Resolved Exception:
Type = null

ModelAndView:
View name = null
View = null
Model = null

FlashMap:
Attributes = null

MockHttpServletResponse:
Status = 404
Error message = null
Headers = []
Content type = null
Body =
Forwarded URL = null
Redirected URL = null
Cookies = []

java.lang.AssertionError: Status
Expected :200
Actual :404

at org.springframework.test.util.AssertionErrors.fail(AssertionErrors.java:59)
at org.springframework.test.util.AssertionErrors.assertEquals(AssertionErrors.java:98)
at org.springframework.test.web.servlet.result.StatusResultMatchers.lambda$matcher$9(StatusResultMatchers.java:619)
at org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:195)
at com.jojoldu.book.springboot.web.HelloControllerTest.helloDto가_리턴된다(HelloControllerTest.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)

from freelec-springboot2-webservice.

kimmari10 avatar kimmari10 commented on September 23, 2024

JAVA_HOME 에러나시는 분은..
환경설정 JAVA_HOME, path = %JAVA_HOME%\bin 으로 되어있는지 확인해보세요..

from freelec-springboot2-webservice.

vincentkim11 avatar vincentkim11 commented on September 23, 2024

from freelec-springboot2-webservice.

donghak0205 avatar donghak0205 commented on September 23, 2024

안녕하세요ㅎㅎ 질문좀드릴라고 하는데요

gradlew wrapper --gradle-version 4.10.2

하니깐 이렇게 뜨는데 ㅠㅠ

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 0s

왜 일까요... JAVA_HOME도 다 설정했는데...
(환경은 windows10입니다.)

from freelec-springboot2-webservice.

Jeonghyeon87 avatar Jeonghyeon87 commented on September 23, 2024

저두 다운그레이드 하니 정상적으로 진행이 됩니다.
감사합니다.덕분에 쉽게 찾았네요.

from freelec-springboot2-webservice.

donghak0205 avatar donghak0205 commented on September 23, 2024

@donghak0205 같은 환경에서 같은 에러가 발생했습니다.
gradle/wrapper/gradle-wrapper.properties 에서 distributionUrl의 값을 https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip 와 같이 바꿔주고 gradle을 refresh하였더니 정상적으로 downgrade 되었습니다.

image

감사드려요ㅎㅎㅎ

from freelec-springboot2-webservice.

osystst avatar osystst commented on September 23, 2024

오, 깃헙을 이렇게도 사용하는군요 ㅎㅎ
에러가 계속 나는데, 혹시나 해서 QR코드를 찍어봤더니 ㅎㅎ

gradle-4.10.2-bin.zip 버전으로 바꾸고 잘 됩니다.
그런데 여전히 그레이들 버전4로 진행해도 되나요?

5버전으로 안 가도 될까요?

from freelec-springboot2-webservice.

chamyeongseop avatar chamyeongseop commented on September 23, 2024

다운 그레이를 해도 아래와 같이 오류가 납니다. 아시는 분 있으실까요

MockHttpServletRequest:
HTTP Method = GET
Request URI = /hello/dto
Parameters = {name=[hello], amount=[1000]}
Headers = []
Body =
Session Attrs = {}

Handler:
Type = org.springframework.web.servlet.resource.ResourceHttpRequestHandler

Async:
Async started = false
Async result = null

Resolved Exception:
Type = null

ModelAndView:
View name = null
View = null
Model = null

FlashMap:
Attributes = null

MockHttpServletResponse:
Status = 404
Error message = null
Headers = []
Content type = null
Body =
Forwarded URL = null
Redirected URL = null
Cookies = []

java.lang.AssertionError: Status
Expected :200
Actual :404

at org.springframework.test.util.AssertionErrors.fail(AssertionErrors.java:59)
at org.springframework.test.util.AssertionErrors.assertEquals(AssertionErrors.java:98)
at org.springframework.test.web.servlet.result.StatusResultMatchers.lambda$matcher$9(StatusResultMatchers.java:619)
at org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:195)
at com.jojoldu.book.springboot.web.HelloControllerTest.helloDto가_리턴된다(HelloControllerTest.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)

"파라미터(name, amount)"를 적절하게 받아오지 못하는 부분에서 문제가 발생했네요.
교재 (Page. 75) 상단에 나와 있는 코드를(HelloController.class)에 추가하셔야 합니다. 완성 된 코드(HelloController.class) 내용은 아래의 URL 참고하시면 됩니다.
URL : https://github.com/jojoldu/freelec-springboot2-webservice/blob/master/src/main/java/com/jojoldu/book/springboot/web/HelloController.java

from freelec-springboot2-webservice.

tiroring09 avatar tiroring09 commented on September 23, 2024

매우 간단한 부분이지만, 윈도우에선 앞의 ./ 빼주어야 적용되는 거 같아요 ㅎㅎ;;

gradlew wrapper --gradle-version 4.10.2 

이 경우는 윈도우와 리눅스계열(맥포함) 간의 파일실행방식에서 오는 차이로 알고있습니다. (tmi..)

윈도우의 경우, gradlew 파일을 실행하기 위해서 cmd에서 바로 파일명을 치면 되지만
gradle wrapper --gradle-version 4.10.2

리눅스계열의 경우는 현재 디렉토리 안에서 (./) gradlew파일을 실행한다는 것을 명시해줘야 하더라구요!
./gradle wrapper --gradle-version 4.10.2

저도 그래들 버전을 높게 쓰는바람에 이곳 이슈페이지 통해서 도움 얻어갑니다. 감사합니다!

from freelec-springboot2-webservice.

KIMHWANSEUNG avatar KIMHWANSEUNG commented on September 23, 2024

저 또한 그레들 오류가 났었는데 이 글 보고 해결했습니다 감사합니다
이러한 이슈사항은 나중에 책을 수정하실때 넣어놓으면 좋을것 같습니다
열심히 완독하겠습니다~!

from freelec-springboot2-webservice.

clyne190804 avatar clyne190804 commented on September 23, 2024

저도 그레이들 오류로 인해 헤매다가 구글링을 해서 여기로 접속하게 됐습니다 ㅎㅎ
깃허브에 소스만 올려놓으시고 질문같은거는 안받으시는 줄 알았는데 질문까지 받으셨군요
덕분에 잘 해결하고갑니다. 감사합니다^^

from freelec-springboot2-webservice.

uiui881 avatar uiui881 commented on September 23, 2024

같은 문제가 있었는데 버전 문제였군요 다운그레이드 해서 잘 해결했습니다!

from freelec-springboot2-webservice.

seoporter avatar seoporter commented on September 23, 2024

저도 같은 문제 였는데 다운그레이드 하니 잘 해결되었습니다. 감사합니다 !

from freelec-springboot2-webservice.

theVelopr avatar theVelopr commented on September 23, 2024

역시 Error를 통해 배울점이 많았습니다. '난 높은 버전을 쓰는데 이게 왜 문제가 되는거지?'
라고 단순하게 접근을 했었는데 버전을 wrapping해야하는 이유라던지 그리고 어떻게 wrapping을 하는지등
정말 유익한 Error였습니다. 👍

from freelec-springboot2-webservice.

kceun avatar kceun commented on September 23, 2024

저도 같은 문제였으나 다운그레이드를 통해 해결하였습니다. 감사합니다 !

from freelec-springboot2-webservice.

theVelopr avatar theVelopr commented on September 23, 2024

@jojoldu Chapter 4에서 Mustache를 이용한 실습을 하던중 HolloControllerTest부분에 illegalargumentexception이 뜨면서 더 이상 진행이 안되길래 BaseTimeEntity와 관련 테스트들을 주석처리하니 다시 테스트가 통과되는 현상이 있습니다.
gradle은 4.10.2 버전으로 wrapping 했으며 Junit4를 사용하고 있습니다.

from freelec-springboot2-webservice.

devsungmin avatar devsungmin commented on September 23, 2024

같은 문제로 해결방법 찾다가 역시 책은 처음부터 보면서 책 저자분과 같은 환경에서 진행 해야 하고 환경 세팅의 중요성을 한번 더 깨닫고 갑니다 ㅠㅠ

from freelec-springboot2-webservice.

copper-tech avatar copper-tech commented on September 23, 2024

74 Page
= HelloResponseDto.java 에서 아래 에러가 발생했습니다.
error: variable name not initialized in the default constructor
private final String name;
^
error: variable amount not initialized in the default constructor
private final int amount;
^

위에 @yazbyz 님이 알려주신 방법으로 해결했습니다.

build.gradle

dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.projectlombok:lombok')
testCompile('org.springframework.boot:spring-boot-starter-test') <<< 이 부분을 추가했습니다.
}

IntelliJ 버전은 다음과 같습니다.

IntelliJ IDEA 2021.1 (Ultimate Edition)
Build #IU-211.6693.111, built on April 6, 2021

from freelec-springboot2-webservice.

yeojin1111 avatar yeojin1111 commented on September 23, 2024

gradle 최신 7.4 버전으로 테스트 했고

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.projectlombok:lombok'
annotationProcessor('org.projectlombok:lombok')
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

이렇게도 동작됩니다

from freelec-springboot2-webservice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.