package com.godcoder.myrest; public class Greeting { private final long id; private final String content; public Greeting(long id, String content){ this.id = id; this.content = content; }
public long getId(){ return id; } public String getContent(){ return content; }
}
package com.godcoder.myrest; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.concurrent.atomic.AtomicLong; @RestController public class GreetingController {
private static final String template = "Hello, %s!"; private final AtomicLong counter = new AtomicLong(); @GetMapping("/greeting") public Greeting greeting(@RequestParam(value = "name", defaultValue = "World") String name) { return new Greeting(counter.incrementAndGet(), String.format(template, name)); } }
http://localhost:8080/greeting
*오류 방지
– 만들어진 maven 프로젝트를 열었을 때
com.godcoder.myrest 로 표시되지 되지 않는다면 파일을 잘못열었거나 이전에 설정을 잘못하신겁니다.
설정을 잘못했을리가 없으시다면 파일을 삭제하고 다시 다운받아 여시는 것을 추천합니다.
– 파일을 추가하실 때 바로 java 클래스 추가가 뜨지 않거나
– 클래스 이름 옆 표시가 파란색이 아니라면 오류가 발생한 것입니다.
오류 코드를 보고 수정이 필요합니다.
– maven 프로젝트를 실행하는 방법은
두 개의 초록색 세모를 누르시면 됩니다.
위의 세모를 누르면 자동으로 실행됩니다.
혹시 오류가 발생했다면 잠시 쉬었다가 재실행 시키시는 것을 추천드립니다.
“Web server failed to start. Port 8080 was already in use.” 가 발생하셨다면 인텔리제이를 껐다가 다시 실행시키시면 바로 해결됩니다.
The system’s focus on diverse gaming options is clear; however, remember responsible play always trumps any promotion. For a comprehensive look at their offerings, check out onbet app first.
[5898]Udangbet77: Login, Daftar, dan Slot Gacor Deposit Dana,Udangbet77 menyediakan akses login dan daftar mudah. Nikmati slot gacor deposit dana serta download apk casino terpercaya untuk main baccarat online. Yuk gabung! visit: udangbet77
There is something wonderfully authentic about the experience I get every time I log in. The atmosphere is warm and inviting while the game mechanics are fair and transparent. I truly feel respected as a player and the support crew always goes the extra mile to make sure I am comfortable. casinobuffaloking
[2086]kkbd অফিসিয়াল লগইন | সেরা ক্যাসিনো বোনাস ও দ্রুত বিকাশ পেমেন্ট,kkbd অ্যাপ ডাউনলোড করে উপভোগ করুন সেরা অনলাইন ক্যাসিনো বোনাস। দ্রুত বিকাশ পেমেন্ট এবং সহজ গাইডলাইন সহ আজই আপনার অ্যাকাউন্ট খুলুন। visit: kkbd
The system’s focus on diverse gaming options is clear; however, remember responsible play always trumps any promotion. For a comprehensive look at their offerings, check out onbet app first.
The apk is very stable and the graphics are crisp. It’s much better than playing through a mobile browser. Five stars from me! e168apk
[7618]bc esports লগইন ও অ্যাপ ডাউনলোড – বিকাশ ক্যাসিনো ডিপোজিট,bc esports লগইন করুন এবং অ্যাপ ডাউনলোড করে অনলাইন স্লট গেম খেলার নিয়ম জানুন। বিকাশ দিয়ে ক্যাসিনো ডিপোজিট করে আজই জয়েন করুন। visit: bc esports
[5898]Udangbet77: Login, Daftar, dan Slot Gacor Deposit Dana,Udangbet77 menyediakan akses login dan daftar mudah. Nikmati slot gacor deposit dana serta download apk casino terpercaya untuk main baccarat online. Yuk gabung! visit: udangbet77
The app installation was a breeze and it runs perfectly on my android. So much better than the web version. Get it at 2jbetdownloadapk.
There is something wonderfully authentic about the experience I get every time I log in. The atmosphere is warm and inviting while the game mechanics are fair and transparent. I truly feel respected as a player and the support crew always goes the extra mile to make sure I am comfortable. casinobuffaloking
[2086]kkbd অফিসিয়াল লগইন | সেরা ক্যাসিনো বোনাস ও দ্রুত বিকাশ পেমেন্ট,kkbd অ্যাপ ডাউনলোড করে উপভোগ করুন সেরা অনলাইন ক্যাসিনো বোনাস। দ্রুত বিকাশ পেমেন্ট এবং সহজ গাইডলাইন সহ আজই আপনার অ্যাকাউন্ট খুলুন। visit: kkbd
cx777, aight, that’s a solid place to land. No complaints here. Pop over to cx777
[6789]22betx লগইন ও অ্যাপ ডাউনলোড | বিকাশ দিয়ে ক্যাসিনো ডিপোজিট,22betx লগইন করে লাইভ ক্যাসিনো বোনাস অফার পান এবং অনলাইন স্লট গেম ট্রিকস জানুন। আজই অ্যাপ ডাউনলোড করে গেমিং শুরু করুন। visit: 22betx
[3234]b777bet লগইন এবং অ্যাপ ডাউনলোড | বিকাশ ক্যাসিনো ডিপোজিট,b777bet লগইন করুন এবং অনলাইন স্লট গেম খেলার নিয়ম জানুন। বিকাশ দিয়ে ক্যাসিনো ডিপোজিট করে আজই আপনার পছন্দের গেম শুরু করুন। visit: b777bet