본문 바로가기
IT 개발, develop/java

[spring] The import org.springframework.web.bind.annotation.RestController conflicts with a type defined in the same file

by newly everyday 2018. 9. 3.


@RestController 를 사용할때 아래 에러를 만났다. 


The import org.springframework.web.bind.annotation.RestController conflicts with a type defined in the same   file


이는 RestController 를 사용할때 아래 에러를 만났다. 


이는 만들려는 class와 어노테이션의 이름이 같아서 나는 에러이다.


class 이름을 RestController  -> RestSameplController 등과 같이 변경해주면 된다. 





댓글