Skip to content

Java-Techie-jt/spring-boot-security-3.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

spring-boot-security-3.0

Note : If you are using spring boot 3.1.x version then please do the below code change

@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
    return http.csrf(AbstractHttpConfigurer::disable)
            .authorizeHttpRequests(auth ->
                    auth.requestMatchers("/product-service/welcome", "/product-service/addNewUser").permitAll()
                            .requestMatchers("/product-service/**")
                            .authenticated()
            )
            .httpBasic(Customizer.withDefaults()).build();
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages