乄柠檬£
2021-02-01 17:12
采纳率: 100%
浏览 706
已采纳

在jeecgboot项目中运行一个demo一直出现这个问题,求大神指教

"C:\Program Files\Java\jdk1.8.0_221\bin\java.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always "-javaagent:D:\IDEA\IntelliJ IDEA 2020.3.1\lib\idea_rt.jar=59355:D:\IDEA\IntelliJ IDEA 2020.3.1\bin" -Dfile.encoding=UTF-8 -classpath "D:\IDEA\IntelliJ IDEA 2020.3.1\lib\idea_rt.jar" com.intellij.rt.execution.CommandLineWrapper C:\Users\Administrator\AppData\Local\Temp\idea_classpath564315336 org.jeecg.JeecgSystemApplication

   (_)                          | |               | |
    _  ___  ___  ___ __ _ ______| |__   ___   ___ | |_ 
   | |/ _ \/ _ \/ __/ _` |______| '_ \ / _ \ / _ \| __|
   | |  __/  __/ (_| (_| |      | |_) | (_) | (_) | |_ 
   | |\___|\___|\___\__, |      |_.__/ \___/ \___/ \__|
  _/ |               __/ |                             
 |__/               |___/



Jeecg  Boot Version: 2.4.0
Spring Boot Version: 2.3.5.RELEASE (v2.3.5.RELEASE)


2021-02-01 16:38:46.105 [background-preinit] INFO  org.hibernate.validator.internal.util.Version:21 - HV000001: Hibernate Validator 6.1.6.Final
2021-02-01 16:38:46.327 [main] INFO  org.jeecg.JeecgSystemApplication:55 - Starting JeecgSystemApplication on WIN-LUFP9FE0RPB with PID 15128 (D:\01我的文档\研一\jeecg项目\jeecg-boot\jeecg-boot\jeecg-boot-module-system\target\classes started by Administrator in D:\01我的文档\研一\jeecg项目\jeecg-boot\jeecg-boot)
2021-02-01 16:38:46.392 [main] INFO  org.jeecg.JeecgSystemApplication:651 - No active profile set, falling back to default profiles: default
2021-02-01 16:38:50.363 [background-preinit] WARN  o.s.h.converter.json.Jackson2ObjectMapperBuilder:127 - For Jackson Kotlin classes support please add "com.fasterxml.jackson.module:jackson-module-kotlin" to the classpath
2021-02-01 16:38:50.653 [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext:559 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [org.jeecg.JeecgSystemApplication]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'jeecgDemoController' for bean class [org.jeecg.modules.demo.test.controller.JeecgDemoController] conflicts with existing, non-compatible bean definition of same name and class [org.jeecg.modules.test.JeecgDemoController]
2021-02-01 16:38:50.681 [main] INFO  o.s.b.a.l.ConditionEvaluationReportLoggingListener:136 - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-02-01 16:38:50.767 [main] ERROR org.springframework.boot.SpringApplication:837 - Application run failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [org.jeecg.JeecgSystemApplication]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'jeecgDemoController' for bean class [org.jeecg.modules.demo.test.controller.JeecgDemoController] conflicts with existing, non-compatible bean definition of same name and class [org.jeecg.modules.test.JeecgDemoController]
	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:189)
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319)
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236)
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:280)
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:96)
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:707)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:533)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
	at org.jeecg.JeecgSystemApplication.main(JeecgSystemApplication.java:34)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:63)
Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'jeecgDemoController' for bean class [org.jeecg.modules.demo.test.controller.JeecgDemoController] conflicts with existing, non-compatible bean definition of same name and class [org.jeecg.modules.test.JeecgDemoController]
	at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.checkCandidate(ClassPathBeanDefinitionScanner.java:349)
	at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:287)
	at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:132)
	at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:296)
	at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:250)
	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:207)
	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:175)
	... 19 common frames omitted

Process finished with exit code 1
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

4条回答 默认 最新

  • APX456 2021-02-01 17:34
    已采纳

    重名了吧

    已采纳该答案
    1 打赏 评论
  • 点X不NG 2021-02-01 20:24

    bean的名称重复了

    打赏 评论
  • 园园是个小菜鸟 2021-08-02 13:37

    我也遇到了,看看有没有大佬能帮忙解决一下,网上的方法不管用

    打赏 评论
  • 故北秋 2021-02-01 18:29

    JEECG-Boot的项目吧

    2 打赏 评论

相关推荐 更多相似问题