Skip to content

Configure WebSecurity without WebSecurityConfigurerAdapter #8978

@eleftherias

Description

@eleftherias

Expected Behavior

We should be able to configure WebSecurity without needing WebSecurityConfigurerAdapter.

The approach is to create a customizer for WebSecurity and expose that as a bean.

Current Behavior

The WebSecurityConfigurerAdapter has the ability to customize WebSecurity.
Here is an example:

@Configuration
static class WebConfigurer extends WebSecurityConfigurerAdapter {
	@Override
	public void configure(WebSecurity web) {
		web
			.ignoring()
				.antMatchers("/ignore1", "/ignore2");
	}
}

Related: gh-8804

Metadata

Metadata

Assignees

Labels

in: webAn issue in web modules (web, webmvc)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions