베오
DCode
베오
전체 방문자
오늘
어제
  • 분류 전체보기 (218)
    • 공지사항 (1)
    • 잡설 (1)
    • Programming (33)
      • [C] (1)
      • [Java] (4)
      • [Python] (2)
      • [Android] (2)
      • [Network] (0)
      • [Operation System] (2)
      • [Spring Boot] (22)
      • [Docker] (0)
    • Algorithm (31)
      • 자료구조 (2)
      • 알고리즘 (Java) (14)
      • 알고리즘 (기초) (15)
    • Coding Test (131)
      • BOJ (131)
      • Algospat (0)
    • 이론적인거 (14)
      • 보안 (5)
      • 오류 해결 (2)
      • 디자인 패턴 (5)
      • 네트워크 (1)
      • 기타 (1)
    • 최신기술 (4)
      • 블록체인 (1)
    • [Project] (1)

블로그 메뉴

  • 🐈‍⬛ GitHub
  • 📫 방명록
  • 🔖 태그

공지사항

인기 글

티스토리

hELLO · Designed By 정상우.
베오

DCode

Programming/[Spring Boot]

프로젝트 생성하기

2023. 1. 19. 10:50

다음 사이트에 접속한다.

Spring Initializr
Initializr generates spring boot project with just what you need to start quickly!
https://start.spring.io/

위와같이 설정한 후 GENERATE를 눌러 프로젝트를 생성한다.

  • 위와 같이 com.springboot.hello에 Controller 패키지를 생성한다.
  • 이후 HelloController 클래스를 작성한다.
    package com.springboot.hello.Controller;
    
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RestController;
    
    @RestController
    public class HelloController {
    
        @RequestMapping("/hello")
        public String hello(){
            return "Hello World";
        }
    }

그 다음 HellApplication을 실행하면 아래 다음과같이 뜬다.

이후 http://localhost:8080/hello 로 들어가 Hello World를 출력하는지 확인하자


Uploaded by N2T

'Programming > [Spring Boot]' 카테고리의 다른 글

Swagger를 활용한 REST API 명세 문서화  (0) 2023.01.25
PUT/DELETE API 만들기  (1) 2023.01.21
POST API 만들기  (0) 2023.01.20
GET API 만들기  (0) 2023.01.19
Talend API Tester를 통해 동작 테스트를 해보자  (0) 2023.01.19
    'Programming/[Spring Boot]' 카테고리의 다른 글
    • PUT/DELETE API 만들기
    • POST API 만들기
    • GET API 만들기
    • Talend API Tester를 통해 동작 테스트를 해보자
    베오
    베오

    티스토리툴바