인프런 커뮤니티 질문&답변
@RequestParam() 빨간줄 오류가 뜹니다. (이클립스)
작성
·
851
0
hellocontroller파일에서 작성중 에러발생! ㅜㅜ
package hello.hellospring.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestPart;
@Controller
public class HelloController {
@GetMapping("hello")
public String hello(Model model) {
model.addAttribute("data","hello!!");
//인텔리제이 문법으롤 attributeName / attributeValue
return "hello";
}
@GetMapping("hello-mvc")
public String helloMvc(@RequestParam("name") String name, Model model) {
model.addAttribute("name", name);
return "hello-template";
}
}
해결했습니다.ㅎㅎㅎ...토씨하나 안틀리고적고 복붙해서 하기까지했는데 .. @Reques치다가 자동완성으로 하니깐 되네요??





