【发布时间】:2018-04-04 00:19:02
【问题描述】:
我在security 包中的web 模块中有AuthorizationServiceImpl 类,即bean https://github.com/JonkiPro/REST-Web-Services/blob/master/web/src/main/java/com/web/web/security/service/impl/AuthorizationServiceImpl.java。在我最新版本的项目中,我将AuthorizationService 和AuthorizationServiceImpl 类移动到core 模块。您可以在屏幕https://zapodaj.net/866eab42f00f0.png.html 上看到它。但是,IntelliJ 在编译过程中会抛出一个错误
2018-04-04 02:10:15.578 WARN 1688 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.web.WebApplication]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'authorizationService' for bean class [com.core.service.impl.AuthorizationServiceImpl] conflicts with existing, non-compatible bean definition of same name and class [com.web.web.security.service.impl.AuthorizationServiceImpl] As if IntelliJ did not know that I moved the class to another package and throws me into conflict with the previous place, but the class is not there anymore.
如何让 IntelliJ 知道类已被移动?
【问题讨论】: