GET API

GetMapping๊ณผ RequestMapping์„ ํ†ตํ•ด ์ฃผ์†Œ ํ• ๋‹นํ•˜๊ธฐ package com.example.hello.controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/api/get") public class GetApiController { @GetMapping(path = "/hello") // http://localhost:9090/api/get/hello public String hello(){ return "HELLO"; } @RequestMapping(path = "/hi", method = RequestMethod.GET) // http://localhost:9090/api/get/hi // @RequestMapping("/hi") // ๊ทธ๋ƒฅ ์œ„์ฒ˜๋Ÿผ๋งŒ ์ ์œผ๋ฉด get / post /... Continue reading...

๊ฐ„๋‹จํ•œ ๋ฌธ์ž ์ถœ๋ ฅํ•˜๊ธฐ / API Tester

๋ธŒ๋ผ์šฐ์ €๋ฅผ ํ†ตํ•ด ์ฃผ์†Œ๋ฅผ ์ž…๋ ฅํ•œ๋Š” ๊ฒƒ์€ GET ๋ฐฉ์‹ (๊ฐœ๋ฐœ์ž๋„๊ตฌ Network์—์„œ ํ™•์ธ ๊ฐ€๋Šฅ) ๊ฐœ๋ฐœ ํ•  ๋•Œ๋Š” ์–ด๋–ป๊ฒŒ ํ…Œ์ŠคํŠธํ• ๊นŒ? -> ๊ตฌ๊ธ€ Chrome ์›น ์Šคํ† ์–ด > Talend API Tester ํ™•์žฅ ํ”„๋กœ๊ทธ๋žจ ์‚ฌ์šฉ ๊ธฐ๋ณธ Tomcat 8080 ์‚ฌ์šฉ but ํ†ฐ์บฃ์ด ์ด๋ฏธ ์„ค์น˜ ๋˜์–ด ์ด๋ฏธ ์‚ฌ์šฉ์ค‘์ด๊ฑฐ๋‚˜ ๋‹ค๋ฅธ ์–ดํ”Œ์—์„œ 8080 ์‚ฌ์šฉ์ค‘์ด๋ผ๋ฉด? -> application properties์—์„œ ์ฝ”๋“œ ์ž‘์„ฑ ํ•ด ๋‹ค๋ฅธ... Continue reading...

์ธํ…”๋ฆฌ์ œ์ด(IntelliJ)๋กœ ์Šคํ”„๋ง๋ถ€ํŠธ(SpringBoot) ์‹œ์ž‘ํ•˜๊ธฐ

IntelliJ Ultimate ๋ฒ„์ „์€ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ์‹œ Spring Initializr๋ฅผ ํ†ตํ•ด ์Šคํ”„๋ง๋ถ€ํŠธ ํ”„๋กœ์ ํŠธ๋ฅผ ๋ฐ”๋กœ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ์ง€๋งŒ, IntelliJ Community ๋ฒ„์ „์€ Spring Initializr๊ฐ€ ์—†๋‹ค ๐Ÿ˜ฅ ์Šคํ”„๋ง๋ถ€ํŠธ(SpringBoot) ์‹œ์ž‘ํ•˜๊ธฐ start.spring.io -> ์Šคํ”„๋ง ๋ถ€ํŠธ ๊ธฐ๋ฐ˜์œผ๋กœ ์Šคํ”„๋ง ๊ด€๋ จ ํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“ค์–ด์ฃผ๋Š” ์‚ฌ์ดํŠธ Maven / Gradle : ์š”์ฆ˜์—” Gradle ๋งŽ์ด ์“ฐ๋Š” ์ถ”์„ธ Spring Boot : ๋ฒ„์ „ ์„ ํƒ / SNAPSHOT,... Continue reading...

[jQuery] ๋ฉ€ํ‹ฐํƒญ ๊ตฌํ˜„2

์ œ์ด์ฟผ๋ฆฌ๋ฅผ ์ด์šฉํ•ด ๋ฉ€ํ‹ฐํƒญ ๊ตฌํ˜„ํ•˜๊ธฐ 2 See the Pen ๋ฉ€ํ‹ฐํƒญ๊ตฌํ˜„ 2 by Jinsol (@losuif) on CodePen. HTML <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>๋ฉ€ํ‹ฐํƒญ๊ตฌํ˜„</title> <link rel="stylesheet" href="style/style.css"> </head> <body> <h1> ๋ฉ€ํ‹ฐํƒญ ๊ตฌํ˜„ </h1> <div id="wrap"> <div id="tabBtn"> <button type="button" class="btnSelected">๊ณต์ง€์‚ฌํ•ญ</button> <button type="button">๊ฐค๋Ÿฌ๋ฆฌ</button> </div>... Continue reading...

[jQuery] ๋ฉ€ํ‹ฐํƒญ ๊ตฌํ˜„

์ œ์ด์ฟผ๋ฆฌ๋ฅผ ์ด์šฉํ•ด ๋ฉ€ํ‹ฐํƒญ ๊ตฌํ˜„ํ•˜๊ธฐ See the Pen ๋ฉ€ํ‹ฐํƒญ ๊ตฌํ˜„ by Jinsol (@losuif) on CodePen. HTML <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>๋ฉ€ํ‹ฐํƒญ</title> <link rel="stylesheet" href="style/style.css"> </head> <body> <h1>๋ฉ€ํ‹ฐํƒญ๊ตฌํ˜„</h1> <div id="wrap"> <div id="btns"> <button type="button" class="selected"> ๊ณต์ง€์‚ฌํ•ญ </button> <button type="button" class=""> ๊ฐค๋Ÿฌ๋ฆฌ </button>... Continue reading...