Spring-boot Hello world

์žญ์žญ์ดยท2021๋…„ 4์›” 11์ผ
1

Spring-boot

๋ชฉ๋ก ๋ณด๊ธฐ
1/11
post-thumbnail

Spring-boot Hello world

๐ŸŽ ๋ชฉ์ฐจ

0. ๊ฐœ์š”

  • Gradle์„ ์ด์šฉํ•˜์—ฌ gradle ์„ค์น˜ ์—†์ด ์Šคํ”„๋ง๋ถ€ํŠธ ์˜ˆ์ œ๋ฅผ ๋งŒ๋“ค์–ด๋ณด์ž !
  • ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ์€ initializr๋กœ, ์‹คํ–‰์€ java๋กœ ํ•  ๊ฒƒ์ด๋‹ค.

1. Install java

sudo apt-get update
sudo apt-get install default-jdk

2. Generate spring

  • ๋‹ค์Œ ํŽ˜์ด์ง€์—์„œ spring init
    • spring initializr
      • Project : Gradle Project
      • Langauge : Java
      • Spring Boot : 2.4.4
      • Project Metadata : default
    • Generate
    • file unzip

3. Start

cd $PROJECT_HOME
./gradlew build -x Test

java -jar ./build/libs/*.jar

0๊ฐœ์˜ ๋Œ“๊ธ€