웹개발/Java & Jsp
[Java 에러] java: cannot find symbol. 각각의 상황 해결방법
kmhan
2021. 3. 29. 03:10
728x90
반응형
1. 에러 메시지가 'class RequestParam'일때
- 에러 메시지
java: cannot find symbol symbol: class RequestParam location: class hello.hellospring.controller.HelloController |
- 해결방법 : 자바 소스 위에 해당 소스 추가
import org.springframework.web.bind.annotation.RequestParam; |
2. 에러 메시지가 'method setName'일때
- 에러 메시지
java: cannot find symbol symbol: class RequestParam location: class hello.hellospring.controller.HelloControllerjava.lang.String) |
- 해결방법 : Hello 객체에 다음 소스 추가
public void setName(String name) { this.name = name; } |
728x90
반응형