我本地跑项目报错如下,有人知道哪里出问题了吗,我没有改代码。
Version:
2023-07-12T20:17:40.178+08:00 INFO 13708 --- [ restartedMain] run.halo.app.Application : Starting Application using Java 17.0.7 with PID 13708 (D:\DEV\ideaproject\halo\application\target\classes started by mingdong in D:\DEV\ideaproject\halo)
2023-07-12T20:17:40.184+08:00 INFO 13708 --- [ restartedMain] run.halo.app.Application : No active profile set, falling back to 1 default profile: "default"
2023-07-12T20:17:40.206+08:00 INFO 13708 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2023-07-12T20:17:40.206+08:00 INFO 13708 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2023-07-12T20:17:40.642+08:00 WARN 13708 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'errorAttributes' defined in class path resource
[org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration.class]: Cannot register bean definition
[Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration;
factoryMethodName=errorAttributes; initMethodNames=null; destroyMethodNames=[(inferred)]; defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration.class]]
for bean 'errorAttributes' since there is already [Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false;
factoryBeanName=haloErrorConfiguration; factoryMethodName=errorAttributes; initMethodNames=null; destroyMethodNames=[(inferred)]; defined in class path resource [run/halo/app/infra/exception/handlers/HaloErrorConfiguration.class]] bound.
2023-07-12T20:17:40.649+08:00 INFO 13708 --- [ restartedMain] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2023-07-12T20:17:40.660+08:00 ERROR 13708 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
APPLICATION FAILED TO START
Description:
The bean 'errorAttributes', defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration.class],
could not be registered.
A bean with that name has already been defined in class path resource [run/halo/app/infra/exception/handlers/HaloErrorConfiguration.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
Disconnected from the target VM, address: '127.0.0.1:61038', transport: 'socket'
Process finished with exit code 0