본문 바로가기

카테고리 없음

자꾸 이름이 겹친다고 에러가 뜬다.

반응형

 

에러내용이...

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.jojoIdu.book.springboot.Application]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'indexController' for bean class [com.jojoIdu.book.springboot.web.dto.IndexController] conflicts with existing, non-compatible bean definition of same name and class [com.jojoIdu.book.springboot.web.IndexController]
	

Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: 
Annotation-specified bean name 'indexController' for bean class [com.jojoIdu.book.springboot.web.dto.IndexController] conflicts with existing, 
non-compatible bean definition of same name and class [com.jojoIdu.book.springboot.web.IndexController]

분명 dto에 겹치는게 없다... 

내가 잘못알고 dto에 IndexController는 생성한 후에 잘라내어서 web으로 옮겼다.

근데 왜 자꾸 겹친다고 뜨는거지? 시간이 해결할 문제인가?


하루가 지났는데 시간이 해결해 주지 않았다. 

검색해보니 나와 똑같이 에러가 난 분이 계셨다. 

https://github.com/jojoldu/freelec-springboot2-webservice/issues/271

 

[오류] indexController 폴더 변경후 bean중복 오류 · Issue #271 · jojoldu/freelec-springboot2-webservice

어떤 오류인가요? 오류설명: 안녕하세요 indexController 클래스위치를 src.main.java.com.cocicalc.web.dto 로 잘못되어 있어서 src.main.java.com.cocicalc.web 로 옮겼는데 이후로 Application.java를 구동하면 org.springfram

github.com

가르침대로 clean - build 하니까 됩니다. 

감사합니다!!!

반응형