Skip to content

Add with() method to apply Custom DSLs returning the builder #13204

Closed
@bwgjoseph

Description

@bwgjoseph

Given that and() is stated for removal, does it mean that in the future, I cannot chain the HttpSecurity?

image

image

// not possible
@Bean
public SecurityFilterChain docsFilterChain(HttpSecurity http) throws Exception {
    return http
        .apply(CustomDSL.customDSL()) //.and() deprecated
        .build();
}

// good to go
@Bean
public SecurityFilterChain docsFilterChain(HttpSecurity http) throws Exception {
    http
        .apply(CustomDSL.customDSL());

    return http.build();
}

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions