on
[SpringBoot/AWS EC2] 인텔리제이 Project 생성 및 git 연동
[SpringBoot/AWS EC2] 인텔리제이 Project 생성 및 git 연동
spring boot project를 이용하여 무중단 배포하는 서비스를 구현
[스프링부트와 AWS로 혼자구현하는 웹 서비스] 책 참고
학교 이메일을 인증하면 IntelliJ IDEA Ultimate은 물론, 젯브레인스의 유료 툴을 1년간 무료로 이용할 수 있다.
+ springboot 프로젝트는 스프링 이니셜라이저로 만들면 open으로 열어서 적용해도 된다.
대충 이런 식으로...
IntelliJ IDEA 2021.3
New Project 클릭
그레이들로 프로젝트를 생성한 뒤
다운로드 JDK를 선택
JAVA 1.8 선택후 다운로드
Next
프로젝트가 저장 될 위치를 설정하고, 프로젝트 이름 등을 설정한다.
workspace라는 폴더에 springboot-webservice라는 폴더에 저장 할 계획
그레이들 프로젝트 생성 완료
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 buildscript { ext { springBootVersion = '2.1.9.RELEASE' } repositories { mavenCentral() jcenter() } dependencies { classpath( "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}" ) } } apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' group 'com.example' version '1.0.4-SNAPSHOT' sourceCompatibility = 1. 8 repositories { mavenCentral() jcenter() } dependencies { implementation ( 'org.springframework.boot:spring-boot-starter-web' ) testImplementation( 'org.springframework.boot:spring-boot-starter-test' ) } Colored by Color Scripter cs
build.gradle 코드 수정
file > settings > Version Control > Github
Login via GitHub > Authorize JetBrains 이후 계정 연결
VCS > Share Project on Github
.idea는 인텔리제이에서 프로젝트 생성 시 자동생성되는 파일이기때문에 커밋하지 않는다.
.gitignore을 올릴것인지 아닌지 물어보는 것
깃허브 연동 완료
from http://hjkongkong.tistory.com/8 by ccl(A) rewrite - 2021-12-05 22:27:29