๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
BE/๐Ÿƒ Spring

IntelliJ ๋ฌด๋ฃŒ ๋ฒ„์ „์œผ๋กœ ์Šคํ”„๋ง ๋ถ€ํŠธ ํ”„๋กœ์ ํŠธ ๋งŒ๋“ค๊ธฐ

by ํ‹ด๋”” 2024. 4. 18.
728x90
๋ฐ˜์‘ํ˜•

ํ•ด๋‹น ํฌ์ŠคํŒ…์€ ๋„์„œ [์Šคํ”„๋ง ๋ถ€ํŠธ 3 ๋ฐฑ์—”๋“œ ๊ฐœ๋ฐœ์ž ๋˜๊ธฐ ์ž๋ฐ”ํŽธ]๋ฅผ ์ฐธ๊ณ ํ•ด์„œ ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!

์‚ฌ์ง„์˜ UI๋Š” ์œ ๋ฃŒ ๋ฒ„์ „์˜ ์ธํ…”๋ฆฌ์ œ์ด๋ผ์„œ ๋ฌด๋ฃŒ ๋ฒ„์ „์˜ UI์™€ ์ฐจ์ด๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. Java ํ”„๋กœ์ ํŠธ๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ๊ณ  ํ”„๋กœ์ ํŠธ ์ด๋ฆ„์„ค์ •, ๋นŒ๋“œ ์‹œ์Šคํ…œ์„ Gradle, Gradle DSL์€ Groovy, GroupId ์ง€์ • ํ•ด์ค๋‹ˆ๋‹ค. (์—ฌ๋‹ด์ด์ง€๋งŒ ์ธํ…”๋ฆฌ์ œ์ด ์œ ๋ฃŒ๋ฒ„์ „ ์กฐ์•„์š”...ํ•œ๋ฒˆ ๋ง›๋“ค๋ฆฌ๋‹ˆ ๋Œ์•„๊ฐˆ ์ˆ˜๊ฐ€ ์—†๋ )

 

 

build.gradle ํŒŒ์ผ๋กœ ์ด๋™

 

plugins {
    id 'java'
    id 'org.springframework.boot' version '3.2.0' // ์ถ”๊ฐ€
    id 'io.spring.dependency-management' version '1.1.0' // ์ถ”๊ฐ€
}

group = 'org.youable'
version = '1.0-SNAPSHOT'
sourceCompatibility = '17' // ์ปดํŒŒ์ผํ•  ๋•Œ ์‚ฌ์šฉ๋˜๋Š” ์ž๋ฐ” ๋ฒ„์ „

repositories {
    mavenCentral()
}

dependencies {
    // ์‚ญ์ œ
//    testImplementation platform('org.junit:junit-bom:5.10.0')
//    testImplementation 'org.junit.jupiter:junit-jupiter'
    implementation 'org.springframework.boot:spring-boot-starter-web' // ์ถ”๊ฐ€
    testImplementation 'org.springframework.boot:spring-boot-starter-test' // ์ถ”๊ฐ€
}

test {
    useJUnitPlatform()
}

 

 

์ƒ๋‹จ ์ฝ”๋ผ๋ฆฌ ๋ชจ์–‘ ๋ˆŒ๋Ÿฌ์„œ ์ž„ํฌํŠธ๋ฅผ ์‹œ์ž‘

 

 

 

์Šคํ”„๋ง ๋ถ€ํŠธ๋ฅผ ์‹คํ–‰ํ•  ํด๋ž˜์Šค๋ฅผ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด ํŒจํ‚ค์ง€ ์ƒ์„ฑ

package org.youable.springbootdeveloper;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.SpringApplication;

@SpringBootApplication
public class SpringBootDeveloperApplication {
    public static void main(String[] args) {
        SpringApplication.run(SpringBootDeveloperApplication.class, args);
    }
}

 

ํด๋ž˜์Šค ์ด๋ฆ„์€ ํ”„๋กœ์ ํŠธ์ด๋ฆ„+Application ํ˜•์‹์œผ๋กœ

์‹œ์ž‘ ์ง€์ ์ธ main ๊นŒ์ง€ ์ž‘์„ฑ

 

run ๋ฒ„ํŠผ ๋ˆŒ๋Ÿฌ์„œ ์‹คํ–‰

์ฝ˜์†”์—์„œ Started SpringBoot ~ ๋ฉ”์„ธ์ง€ ํ™•์ธ

์„ฑ๊ณต์ ์œผ๋กœ ์‹คํ–‰ ๋˜์—ˆ๋‹ค๋ฉด http://localhost:8080 ํ™•์ธํ•˜๋ฉด index.html ์ด ์—†๊ธฐ ๋•Œ๋ฌธ์— html ์Šคํฌ๋ฆฝํŠธ๋Š” ์•ˆ๋ณด์ด๊ณ  404 ๊ฐ€ ๋œน๋‹ˆ๋‹ค!

728x90
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€