inflearn logo
강의

講義

知識共有

Spring BootとReactで学ぶ超簡単REST API掲示板作り

開発環境構築

(재업) 선생님 제발 도와주세요

114

ehd50409785

投稿した質問数 8

0

image.png

일단 여기서 이렇게 뜨구요

 

 

 

이거 전에

Spring Initializr

여기서 설정하고 그거 열어줘서 작업하는건데

 

저렇게 뜨는데 어떻게해야하나요...
혹시나 PracApplication.java 에서 실행하면

 

image.png


Execution failed for task ':restapi.prac.PracApplication.main()'.

> Process 'command 'C:\Program Files\Java\jdk-21\bin\java.exe'' finished with non-zero exit value 1

* 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 12s

3 actionable tasks: 1 executed, 2 up-to-date

 

이렇게 또 에러가 뜨구요...

추가로 ai답변으로 build.gradle 의 dependencies 확인하래서

 

image.png

 

image.png

 

이거 확인했는데 이상없는거 같고 정상적으로 C:\Program Files\Java\jdk-21\bin\java.exe 이 경로에 있습니다.

 

 

마지막으로

 

image.png

이렇게 build.gradle을 연 상태로 run을 하면되는데 (localhost:8080 은 안열림)

application.properties 에서는 run 버튼 자체가 활성화가 안되있고

 

PracApplication.java 에서는 run이 활성화는 되있지만 계속 제가 말헀던 에러가 뜹니다



제발 ai답변말고 선생님이 답변해주시면 감사하겠습니다

mysql rest-api spring-boot jpa react.js

回答 1

0

neneee

안녕하세요!

이미지상에서는 정상적으로 빌드는 완료가 된거같은데 실행하는 부분에서 오류가 발생한거 같네요.

일단 java 버전이 21버전이 정상적으로 설치되었는지, 환경변수가 제대로 되어있는지 확인해보시겠어요?

0

ehd50409785

image.pngimage.pngimage.png

환경변수 설정잘되있고 ide 상에서 java -version 쳤을때 잘나옵니다 ㅠㅠ
start.spring.io 여기서 만들떄도 21 버전으로 선택했구요

혹시나 문제 있나싶어서 ide도 다시 지웠다 깔고, jdk도 다시 지웠다 깔고 , start.spring.io 도 다시 새로 하고 해도 안되네요 ㅠㅠ

 

Execution failed for task ':restapi.prac.PracApplication.main()'.

> Process 'command 'C:\Program Files\Java\jdk-21\bin\java.exe'' finished with non-zero exit value 1

* 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 9s

3 actionable tasks: 1 executed, 2 up-to-date

 

이 에러메시지가 도대체 뭔질 모르곘네요,,, gpt한테 물어봐도 알수없는 말만하고

1

Byeong Gwan Seo

지금 이 에러는 그냥 단순히 PracApplication.main()을 실행하는데 실패했다는 결과만 알려주고 있어서 강의자분도 답변이 어려우실 거에요.
일단 자바를 실행하신 다음에 터미널에 뜨는 --scan 부분이 클릭이 가능할 거에요.
*************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active). > Task :restapi.practice.PracticeApplication.main() FAILED 3 actionable tasks: 2 executed, 1 up-to-date FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':restapi.practice.PracticeApplication.main()'. > Process 'command 'C:\Program Files\Java\jdk-24\bin\java.exe'' finished with non-zero exit value 1 Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Get more help at https://help.gradle.org. BUILD FAILED in 7s Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Use defined at https://gradle.com/help/legal-terms-of-use. Do you accept these terms? [yes, no]
그 부분을 클릭해야 위 처럼 정확히 어느 부분이 문제가 되어서 지금 터지고 있다고 자세하게 알 수 있어요. 그걸 공유해주시면 강의자 분도 더 대답하기 쉬워질겁니다.

패키지 구분에 대해 궁금한게 있습니다

0

8

1

스프링부트 서버 에러나요

0

17

1

코드를 첨부해야하는 이유가 있나요?

0

20

2

2026.04에 추가된 강의 시청 불가

0

27

1

Service Create/Update Record 운용과 Delete Record 미운용의 차이 질문

0

18

1

지금 이게 맞는건지 문의드립니다.

0

44

1

7.React UI구현하기 에서 css파일을 어디서 다운받나요?

0

58

2

spring 과 mysql 연결이 안돼요

0

83

1

Css 복사하는 코드 첨부되어 있나요?

0

72

2

스프링부트 에러

0

88

2

자바 17

0

71

2

리액트 부분 vscode 써도 괜찮을까요

0

141

1

선생님 덧글의 답글

0

96

2

앞에 내용 다 따라했는데 실행이안됩니다 자꾸

0

62

1

실행시 에러

0

57

1

최초에 서버 키는게 안됩니다 ㅠㅠ

0

79

1

[게시글 목록 페이지]수업에서 강의 내용대로 진행이 안되네요.

0

97

2

두번째 게시글 등록이 안되네요.

0

148

4

스프링 기동 하는 부분에서 계속 에러가 나와서 질문 드립니다.

0

151

4

리액트 사용시 컴포넌트 선언과 변수 선언 관련 질문

0

106

2

DB에 데이터가 저장이 되지 않습니다.

0

109

2

Spring Boot , Java 설치시 버전

0

203

3

SpringBoot 초기세팅 수강중 오류가 있어 문의드립니다.

0

189

2

중괄호 Tab to Exit 설정

0

163

1