Changed name in changesets and improved SecurityConfig so there's no warns

This commit is contained in:
Индекс Зиро 2025-02-19 18:54:45 +03:00
parent 0b02367cc3
commit 21d002bce5
4 changed files with 7 additions and 5 deletions

View File

@ -4,7 +4,9 @@ import com.indexzero.finals.service.impl.UserDetailsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.ProviderManager;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider; import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.config.Customizer; import org.springframework.security.config.Customizer;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@ -61,11 +63,11 @@ public class SecurityConfig {
} }
@Bean @Bean
public AuthenticationProvider authenticationProvider(){ public AuthenticationManager authenticationManager(){
DaoAuthenticationProvider provider = new DaoAuthenticationProvider(); DaoAuthenticationProvider provider = new DaoAuthenticationProvider();
provider.setUserDetailsService(userDetailsService); provider.setUserDetailsService(userDetailsService);
provider.setPasswordEncoder(passwordEncoder()); provider.setPasswordEncoder(passwordEncoder());
return provider; return new ProviderManager(provider);
} }
@Bean @Bean

View File

@ -5,7 +5,7 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd 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"> http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<changeSet id="2024-10-20--0001-code-03" author="anepretimov"> <changeSet id="2024-10-20--0001-code-03" author="okalugin">
<preConditions onFail="MARK_RAN"> <preConditions onFail="MARK_RAN">
<not> <not>

View File

@ -5,7 +5,7 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd 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"> http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<changeSet id="2024-10-20--0001-code-data-02" author="anepretimov"> <changeSet id="2024-10-20--0001-code-data-02" author="okalugin">
<loadData tableName="code" file="db.changelog/data/csv/2024-10-20--0001-code-data.csv" <loadData tableName="code" file="db.changelog/data/csv/2024-10-20--0001-code-data.csv"
separator=";" separator=";"
quotchar='"' quotchar='"'

View File

@ -5,7 +5,7 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd 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"> http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<changeSet id="2024-10-20--0002-employee-data" author="anepretimov"> <changeSet id="2024-10-20--0002-employee-data" author="okalugin">
<loadData tableName="employee" file="db.changelog/data/csv/2024-10-20--0002-employee-data.csv" <loadData tableName="employee" file="db.changelog/data/csv/2024-10-20--0002-employee-data.csv"
separator=";" separator=";"
quotchar='"' quotchar='"'