Spring Boot 설치

2021. 12. 25. 19:47Java/Spring Boot

STS 다운로드 : https://spring.io/tools

 

Spring Tools 4 is the next generation of Spring tooling

Largely rebuilt from scratch, Spring Tools 4 provides world-class support for developing Spring-based enterprise applications, whether you prefer Eclipse, Visual Studio Code, or Theia IDE.

spring.io

https://download.springsource.com/release/STS4/4.13.0.RELEASE/dist/e4.22/spring-tool-suite-4-4.13.0.RELEASE-e4.22.0-win32.win32.x86_64.self-extracting.jar

JDK 다운로드 : https://jdk.java.net/java-se-ri/17

 

Java Platform, Standard Edition 17 Reference Implementations

Java Platform, Standard Edition 17 Reference Implementations The official Reference Implementation for Java SE 17 (JSR 392) is based solely upon open-source code available from the JDK 17 Project in the OpenJDK Community. The binaries are available unde

jdk.java.net

https://download.java.net/openjdk/jdk17/ri/openjdk-17+35_windows-x64_bin.zip 

JDK 설치

압축해제

환경변수 셋팅 : JAVA_HOME, PATH

STS 설치

java -jar spring-tool-suite-4-4.13.0.RELEASE-e4.22.0-win32.win32.x86_64.self-extracting.jar

console out 늘리기

Main menu > Window > Preferences > Run/Debug > Console

Check Limit console output

Set Console buffer size(characters) : 1,000,000

gitlab에 생성된 project 연동

# gitlab에서 clone

Window > Show View > Other.. 

Git > Git Repositories

Clone a Git Repository and add the clone to this view

URI: 아래 내용 입력하면 자동으로 기입됨 -> http://test.gitlab.co.kr/root/temp.git

Host: test.gitlab.co.kr

Repository path: /root/temp.git

protocol: http

계정/비밀번호 입력하면 gitlab에서 clone

# sts에 project 생성

생성된 clone 위에서 오른쪽 마우스 버튼

Import Projects

pom.xml 셋팅

parent 아래 태그들은 parent의 버전을 상속받음

만약 아래 태그들에서 중복된 내역이 기술하면, managed.. 이런식의 warning이 발생함

중복되지 않는 것만 추가하면 됨

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>	
	<groupId>com.example</groupId>
	<artifactId>example</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>example</name>
	<description>Demo project for Spring Boot</description>
	<properties>
		<java.version>11</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.5.9</version>
	</parent>
	<dependencies>	
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>		
		<!-- https://mvnrepository.com/artifact/org.json/json -->
		<dependency>
		    <groupId>org.json</groupId>
		    <artifactId>json</artifactId>
		    <version>20211205</version>
		</dependency>
	</dependencies>

	<build>	
		<plugins>
			<plugin>
			    <groupId>org.springframework.boot</groupId>
			    <artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

</project>

'Java > Spring Boot' 카테고리의 다른 글

Spring(Boot) 사용법  (0) 2022.02.25
STS 에러  (0) 2022.01.31
파일 UTF-8 셋팅  (0) 2021.09.12
Spring boot index.html 설정  (0) 2021.04.05
Spring boot WebMvcConfigurer jsp 셋팅  (0) 2021.04.05