Skip to content

Allow org.springframework.security.config.Customizer static imports #206

Closed
@rwinch

Description

@rwinch

It would be nice if org.springframework.security.config.Customizer.withDefaults could be excluded from AvoidStaticImportCheck. It would change the configuration from:

	// @formatter:off
	protected void configure(HttpSecurity http) throws Exception {
		http
			.authorizeRequests((requests) -> requests
				.anyRequest().authenticated()
			)
			.httpBasic(Customizer.withDefaults())
			.formLogin(Customizer.withDefaults());
	}
	// @formatter:on

to

	// @formatter:off
	protected void configure(HttpSecurity http) throws Exception {
		http
			.authorizeRequests((requests) -> requests
				.anyRequest().authenticated()
			)
			.httpBasic(withDefaults())
			.formLogin(withDefaults());
	}
	// @formatter:on

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions