송민준의 개발노트

인텔리제이(intellij) 프로젝트 생성(세팅 + 깃허브) 본문

웹/Spring boot

인텔리제이(intellij) 프로젝트 생성(세팅 + 깃허브)

송민준 2020. 2. 12. 23:27

 

1. new project -> gradle -> java -> next

 

2. Groupid, ArtifactId 설정 -> finish

 

3. build.gradle 설정

buildscript {
	// ext는 전역변수를 설정하겠다는 의미
    ext {
        springBootVersion = '2.1.7.RELEASE'
    }
    repositories {
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}
// 자바와 부트를 사용하기 위한 필수 4가지 플러그인
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

group 'org.example'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

// 각종 의존성들을 어떤 원격 저장소에서 받을지를 정한다. jcenter를 요즘 많이씀(개인 라이브러리때문에)
repositories {
    mavenCentral()
    jcenter()
}

dependencies {
    compile('org.springframework.boot:spring-boot-starter-web')
    testCompile('org.springframework.boot:spring-boot-starter-test')
}

 변경하고 나면 오른쪽 하단에 Gradle profjects need to be imported가 뜨는데 자동 갱신되게 Enable Auto 클릭

 

4. 확인(7분이나 걸렸다)

 

 

깃허브

5. ctrl + Shift + A  누른 후 share project on github 입력 후 아래처럼 클릭

 

6. 로그인

7. 레파지토리 이름 설정 후 Share

* 인텔리제이는 Git을 다운받아야 하나 보다.

https://git-scm.com/download/win

 

Git - Downloading Package

Downloading Git Now What? Now that you have downloaded Git, it's time to start using it.

git-scm.com

* Git 깔고나서도 empty git --version output 어쩌고 나오는데

git.exe를 설정을 안해줘서 그런거다

 

8. 푸쉬할 파일목록 (idea는 불필요한 파일)

9. 깃헙에서 확인

10. ignore 플러그인 설치(인텔리제이는 ignore 지원 안한다고 함)

 ctrl+shift+A -> plugins 입력 클릭

11. ignore 검색 후 인스톨

12. 재시작 후 프로젝트 우클릭 후 아래와 같이 선택

 

13. 템플릿이나 언어, 프레임워크 등 선택해서 담을 수 있음

 

14. gradle과 idea 만 반영하겠음.

15. ctrl+K 눌러서 커밋 창 열기 -> 파일 체크 후 메시지 적고 커밋 버튼 클릭

 

16. 커밋 후 푸쉬하기(ctrl+shift+K)

 

17. 푸쉬 되었나 확인

 

* 번외 clone 하기

1. VCS - Git - Clone

2. url입력 또는 내 깃헙레퍼지토리에서 선택

' > Spring boot' 카테고리의 다른 글

등록 API 만들기  (0) 2020.02.19
Spring Data JPA  (0) 2020.02.19
DTO 생성 후 롬복 적용(junit 테스트까지)  (0) 2020.02.17
스프링부트 포트 변경(intellij-인텔리제이) gradle  (0) 2020.02.16
Springboot junit(intellij)  (0) 2020.02.16