Skip to content

3.7.2微服务启动报错,corsFilter方法重复 #8115

Closed
@mythraHomura

Description

@mythraHomura
版本号:

jeecgboot:3.7.2
java8
nacos:2.4.2

问题描述:

jeecg-system-cloud微服务启动报错,提示corsFilter方法名重复


APPLICATION FAILED TO START


Description:

The bean 'corsFilter', defined in class path resource [org/jeecg/config/WebMvcConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/jeecg/starter/cloud/config/GwCorsFilter.class] and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

尝试过在nacos的yml文件上加上spring.main.allow-bean-definition-overriding=true,但还是无效

错误截图:
Image

友情提示:

  • 未按格式要求发帖、描述过于简单的,会被直接删掉;
  • 描述问题请图文并茂,方便我们理解并快速定位问题;
  • 如果使用的不是master,请说明你使用的分支;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions