250x250
Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Open Source
- MySQL
- MSSQL
- SpringBoot
- Docker
- myBatis
- jpa
- Source
- oracle
- AJAX
- Eclipse
- maven
- STS
- 문서
- Spring Boot
- error
- JDBC
- 오픈소스
- ubuntu
- PostgreSQL
- Core Java
- git
- JavaScript
- 설정
- spring
- Tomcat
- Python
- Thymeleaf
- Exception
- IntelliJ
Archives
- Today
- Total
헤르메스 LIFE
[Spring Boot] IntelliJ로 간단한 Spring Boot 환경 테스트 본문
728x90
JDK 1.8.x
IntelliJ IDEA 2020.3
1. New Project
2. Maven 선택
3. 프로젝트 경로 설정
4. Maven 설정파일 기본 ( pom.xml )
5. Maven 설정파일 수정
- 2.2.4.RELEASE 빨강색 오류남. ( pom.xml >> maven >> Reload Project 하면 사라짐. )
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.rest</groupId>
<artifactId>SimpleRestAPI</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.4.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<!-- 빌드 플러그인 -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
6. Application.java
package com.sample;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
7. 실행 ( Shift + F10 )
8. 실행결과 ( 일단 시작은 됐음. )
9. 브라우저 실행
※ Web server failed to start. Port 8080 was already in use.
※ IntelliJ는 뭔가 옵션이 보여짐. ㅎㅎ
728x90
'Spring Boot Framework' 카테고리의 다른 글
[Spring Boot] JUnit Test (0) | 2021.01.17 |
---|---|
[Spring Boot] Spring Boot + JWT ( JSON Web Token ) + DB 연결 (0) | 2021.01.14 |
[Spring Boot] Spring Boot + JWT ( JSON Web Token ) 테스트 (0) | 2021.01.10 |
[Spring Boot] Spring Boot Sample REST + Log4J2 (0) | 2021.01.09 |
[Spring Boot] Spring Boot Sample REST (0) | 2021.01.08 |