diff --git a/src/main/java/com/indexzero/finals/config/SecurityConfig.java b/src/main/java/com/indexzero/finals/config/SecurityConfig.java index 171298b..112eccb 100644 --- a/src/main/java/com/indexzero/finals/config/SecurityConfig.java +++ b/src/main/java/com/indexzero/finals/config/SecurityConfig.java @@ -4,7 +4,9 @@ import com.indexzero.finals.service.impl.UserDetailsServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.AuthenticationProvider; +import org.springframework.security.authentication.ProviderManager; import org.springframework.security.authentication.dao.DaoAuthenticationProvider; import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; @@ -61,11 +63,11 @@ public class SecurityConfig { } @Bean - public AuthenticationProvider authenticationProvider(){ + public AuthenticationManager authenticationManager(){ DaoAuthenticationProvider provider = new DaoAuthenticationProvider(); provider.setUserDetailsService(userDetailsService); provider.setPasswordEncoder(passwordEncoder()); - return provider; + return new ProviderManager(provider); } @Bean diff --git a/src/main/resources/db.changelog/1.0/2024-10-20--0001-code.xml b/src/main/resources/db.changelog/1.0/2024-10-20--0001-code.xml index 9dd14c7..411b754 100644 --- a/src/main/resources/db.changelog/1.0/2024-10-20--0001-code.xml +++ b/src/main/resources/db.changelog/1.0/2024-10-20--0001-code.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> - + diff --git a/src/main/resources/db.changelog/data/2024-10-20--0001-code-data.xml b/src/main/resources/db.changelog/data/2024-10-20--0001-code-data.xml index 9eecdd4..5f7af7a 100644 --- a/src/main/resources/db.changelog/data/2024-10-20--0001-code-data.xml +++ b/src/main/resources/db.changelog/data/2024-10-20--0001-code-data.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> - + - +