0
我正在開發一個簡單的maven + spring應用程序,並且出現以下錯誤。它說我的兩個班級有衝突。所以我刪除了第二堂課,但我仍然得到相同的錯誤。我嘗試重新啓動服務器,但它仍然說我的課程存在。有人可以幫忙嗎?即使在刪除類後也發生ConflictingBeanDefinitionException
Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.nibm.config.RootConfig]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'employeeController' for bean class [com.nibm.hibernate.controller.EmployeeController] conflicts with existing, non-compatible bean definition of same name and class [com.nibm.controller.EmployeeController]
您必須刪除第二個類,但它仍將位於服務器的部署目錄中。請嘗試手動刪除服務器的部署目錄。您正在使用哪個服務器。 – shankarsh15
我正在使用glassfish。在web.xml中找不到任何類。 –