본문 바로가기

개발/Spring

[SpringBoot] talk-about 프로젝트 시작하기

 

* 일단 게시판 만들기부터 시작

* 책을 따라 구현 후 컨셉을 잡아서 발전시키는 것으로 하기

 

 

1. 프로젝트 생성

Gradle project 생성

 

 

2. 그레이들 프로젝트를 스프링 부트 프로젝트로 변경

- build.gradle 파일

- 책은 spring 2.1.7.RELEASE 버전

- 내가 사용할 것은 최신 2.7.3 버전

plugins {
    id 'java'
    id 'org.springframework.boot' version '2.7.3'
    id 'io.spring.dependency-management' version '1.0.13.RELEASE'
}

group 'com.talk.about'
version '1.0-SNAPSHOT'
sourceCompatibility = '11'

repositories {
    mavenCentral()
}

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

1. plugins apply

2. dependencies에서 compile 대신 implementation을 사용

 

* 일단 이렇게 생성해두고 테스트한 후에 문제가 되는 부분을 수정할 예정

 

 

3. GitHub 연결하기

command + shift + a -> Share Project on GitHub로 로그인 후 repository 생성 연결

 

.ignore 플러그인

- 파일 위치 자동완성

- ignore 처리 여부 확인

- ignore 파일 지원

command + n -> new file