Java/Spring
[Spring] 빌드하고 실행하기(Git Bash, CMD)
hh_lin
2021. 10. 20. 00:35
: Git Bash, Windows CMD에서 gradle 빌드하고 실행하기
1. 프로젝트 디렉터리로 이동 (Git Bash, CMD 동일)
C:\Users\hhlin>cd hello-spring
2. gradle 실행
# Windows
C:\Users\hhlin\hello-spring>./gradlew # Git Bash
C:\Users\hhlin\hello-spring>gradlew # CMD
# Mac
C:\Users\hhlin\hello-spring>./gradlew build
# 잘 안되는 경우
# ./gradlew clean 하면 build 폴더가 없어짐
# ./gradlew clean build 하면 지우고 다시 생성
C:\Users\hhlin\hello-spring>./gradlew clean build
3. build/libs 디렉터리로 이동 (Git Bash, CMD 동일)
C:\Users\hhlin\hello-spring>cd build/libs
4. 파일 리스트 확인
C:\Users\hhlin\hello-spring\build\libs>ls # Git Bash
C:\Users\hhlin\hello-spring\build\libs>dir # CMD
5. 실행
C:\Users\hhlin\hello-spring\build\libs>java -jar hello-spring-0.0.1-SNAPSHOT.jar
# IntelliJ에서 CMD 대신에 Git Bash 연동하기
2021.10.20 - [기타/IntelliJ] - [IntelliJ] Git Bash 연동
[IntelliJ] Git Bash 연동
1. File - Settings - Tools - Terminal (단축키 Ctrl + Alt + s) : Application Settings 밑에 Shell path에 git bash 경로 적어줌 "C:\Program Files\Git\bin\bash.exe" -login -i 2. IntelliJ 재구동 htt..
hhlin.tistory.com
참고 - 인프런 무료 강의 : 스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술 [김영한님]
https://www.inflearn.com/course/%EC%8A%A4%ED%94%84%EB%A7%81-%EC%9E%85%EB%AC%B8-%EC%8A%A4%ED%94%84%EB%A7%81%EB%B6%80%ED%8A%B8/dashboard
[무료] 스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술 - 인프런 | 강의
스프링 입문자가 예제를 만들어가면서 스프링 웹 애플리케이션 개발 전반을 빠르게 학습할 수 있습니다., 스프링 학습 첫 길잡이! 개발 공부의 길을 잃지 않도록 도와드립니다. 📣 확인해주세
www.inflearn.com