Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rwinch opened this issue Jul 9, 2020 · 0 comments
Closed

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

rwinch opened this issue Jul 9, 2020 · 0 comments

Comments

@rwinch
Copy link

rwinch commented Jul 9, 2020

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
@philwebb philwebb added this to the 0.0.23 milestone Jul 14, 2020
@philwebb philwebb changed the title Consider excluding org.springframework.security.config.Customizer.withDefaults Allow org.springframework.security.config.Customizer static imports Jul 14, 2020
philwebb added a commit that referenced this issue Aug 24, 2020
Add an additional exclusion to `SpringAvoidStaticImportCheck` so that
the `org.springframework.security.config.Customizer` class can be used.

Closes gh-206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants