config/src/main/java/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurer.java
public HttpBasicConfigurer<B> realmName(String realmName) throws Exception {
		this.basicAuthEntryPoint.setRealmName(realmName);
		this.basicAuthEntryPoint.afterPropertiesSet();
		return this;
	}
public HttpBasicConfigurer<B> realmName(String realmName) throws Exception {
		this.basicAuthEntryPoint.setRealmName(realmName);
		this.basicAuthEntryPoint.afterPropertiesSet();
		return this;
	}
Allows easily changing the realm, but leaving the remaining defaults in place. If
{@link #authenticationEntryPoint(AuthenticationEntryPoint)} has been invoked,
invoking this method will result in an error.

@param realmName the HTTP Basic realm to use
@return {@link HttpBasicConfigurer} for additional customization
@throws Exception