<윈도우>
명령 프롬프트(cmd)로 빌드하기
- cmd 실행 후 spring boot 프로젝트가 저장된 경로로 접근한다. (파일 이름이 hello-spring라고 가정)
- gradlew 입력 후 엔터키를 누르면 빌드 파일이 생성된다. (윈도우의 경우만 gradlew을 입력하면 됨)
- 생성된 build 파일로 들어간다. (dir로 확인 후, cd build )
- build 파일 안에 libs 파일로 들어간다. (cd libs)
- lib파일의 파일 목록을 보면 확장자가 .jar인 파일이 들어있다. (hello-spring-0.0.1-SNAPSHOT.jar)
- java -jar hello-spring-0.0.1-SNAPSHOT.jar 실행
위의 화면이 뜨면 빌드와 실행이 잘 된 것이다.
만약 빌드나 실행이 잘 되지 않는다면 버전 호환을 확인하는 것을 추천한다.
'Back-end > Spring' 카테고리의 다른 글
JPA, Hibernate 에러 -> org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing : (0) | 2023.09.25 |
---|---|
Maven 이란? (0) | 2023.07.31 |
어노테이션(Annotation) 정리 (0) | 2023.04.20 |
[Spring] 오류 목록 (0) | 2023.04.18 |
[Spring] 프로젝트 생성 및 기본 설정 (0) | 2023.04.11 |