Skip to content

Fix conflicting bean names between @EnableWebSecurity and @EnableWebSocketSecurity #16011

Closed
@zyro23

Description

@zyro23

Describe the bug

***************************
APPLICATION FAILED TO START
***************************

Description:

The bean 'webAuthorizationManagerPostProcessor', defined in class path resource [org/springframework/security/config/annotation/web/configuration/ObservationConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/security/config/annotation/web/socket/WebSocketObservationConfiguration.class] and overriding is disabled.

Action:

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

the naming conflict is between:

To Reproduce

  • create an empty boot-3.4.0-RC1 app with spring-web, spring-security, spring-websocket
  • add spring-security-messaging as dependency
  • add @EnableWebSocketSecurity

Expected behavior

app starts

Sample

sample app will be referenced asap, thank you!

Metadata

Metadata

Assignees

Labels

in: configAn issue in spring-security-configstatus: duplicateA duplicate of another issuetype: bugA general bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions