Skip to content

Commit

Permalink
Setting the bean to be conditional (#638)
Browse files Browse the repository at this point in the history
  • Loading branch information
cram-cfa authored Jan 7, 2025
1 parent 36d60d9 commit 6967fb8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package formflow.library.config;


import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
Expand Down Expand Up @@ -39,6 +40,7 @@ public DefaultCookieSerializer setDefaultSecurityCookie() {
* @throws Exception Internal configuration error
*/
@Bean
@ConditionalOnMissingBean
SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws Exception {
httpSecurity.formLogin(AbstractHttpConfigurer::disable);
return httpSecurity.build();
Expand Down

0 comments on commit 6967fb8

Please sign in to comment.