Solucionado (ver solução)
Solucionado
(ver solução)
4
respostas

Que padrão design patterns é esse

Acho muito interessante esse design patterns, mas não identifiquei qual é. Ele é do Spring boot.

  http.csrf().disable()
                .cors().configurationSource(request -> new CorsConfiguration().applyPermitDefaultValues())
                .and()
                .sessionManagement().sessionCreationPolicy(STATELESS)
                .and()
                .exceptionHandling().authenticationEntryPoint((req, resp, e) -> resp.sendError(HttpServletResponse.SC_UNAUTHORIZED))
                .and()
                .authorizeRequests()
                .antMatchers(jwtConfiguration.getLoginUrl()).permitAll()
                //.antMatchers(HttpMethod.GET, "/**/swagger-resources/**", "/**/webjars/springfox-swagger-ui/**", "/**/v2/api-docs/**").permitAll()
                .antMatchers("/semparar/v1/admin/**").hasRole("ADMIN")
                .antMatchers("/auth/user/**").hasAnyRole("ADMIN", "USER")
                .anyRequest().authenticated();
4 respostas
solução!

Esse pattern é Fluent Interfaces

Muito obrigado pela resposta! Você sabe se na Alura possui alguma video-aula falando sobre esse padrão ?

Infelizmente não amigo, mas segue dois posts sobre o assunto para te ajudar:

https://dev.to/awwsmm/build-a-fluent-interface-in-java-in-less-than-5-minutes-m7e

https://dzone.com/articles/java-fluent-api-design

Ajudou! Muito obrigado

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software