ERROR - GetMapping cannot be resolved to a type, RequestParam cannot be resolved to a type 해결방법

CODEDRAGON Development/Spring

반응형



 

 

 

에러 메시지

GetMapping cannot be resolved to a type

RequestParam cannot be resolved to a type


 

 

 

 

 

 

 

 

해결방법

Controller관련 어노테이션(Annotation), Parameter 처리 어노테이션에서 발생하는 에러를 해결할 있습니다.

 

 

 

pox.xml 의존성 추가

pox.xml Spring 라이브러리가 추가되어져 있는지 확인한 추가하면 해결됩니다.

 

<dependencies>

 

      <!-- Spring 프레임워크 설치 -->

<!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-context</artifactId>

<version>5.0.13.RELEASE</version>

</dependency>

<!-- Spring MVC 라이브러리 -->

<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->

<dependency>

    <groupId>org.springframework</groupId>

    <artifactId>spring-webmvc</artifactId>

    <version>5.1.6.RELEASE</version>

</dependency>

</dependencies>

 

 

 

 

 

 

Mave Project Update

프로젝트 선택 >> 마우스 우클릭 >> [Mave] >> [Update Project…]

 

 

 

 

 

 

해결완료!!!


 



 


반응형

'Development > Spring' 카테고리의 다른 글

JUnit Library 검색 및 설치  (0) 2019.09.07
Layered Architecture, Layered Architecture 영역  (0) 2019.08.16
Static Web Resource 처리  (0) 2019.08.09
"Spring Explorer" 뷰 오픈 하기  (0) 2019.07.27
@PathVariable  (0) 2019.07.07