intelliJ
프로젝트 생성
File > NewProject > Maven
java 버전 확인 후 next
Artifact Coordinates 에 GroupId (패키지이름), ArtifactId (프로젝트 이름 작성 후 Finish)
pom.xml 추가
<!-- Inherit defaults from Spring Boot -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>
</parent>
<!-- Add typical dependencies for a web application -->
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<!-- Package as an executable jar -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
SpringBootApplication 클래스 생성
src > main> java 에 패키지 생성 후 클래스 생성
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
'DEV > Spring' 카테고리의 다른 글
[JPA] JPA 세팅, h2(인메모리 관계형 데이터 베이스), 어노테이션정리 (0) | 2020.02.18 |
---|---|
[SpringBoot]Gradle 프로젝트를 스프링부트 프로젝트로 변경 (0) | 2020.02.17 |
@RequestMapping, @PostMapping, @GetMapping (0) | 2020.02.05 |
@Controller 와 @RestController 차이 (0) | 2020.02.05 |
mybatis 설정 에러 : Caused by: org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 53; 문서 루트 요소 "mapper"은(는) DOCTYPE 루트 "configuration"과(와) 일치해야 합니다. (0) | 2019.12.19 |