package cn.novalon.manage.sys.config;

import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.data.r2dbc.repository.config.EnableR2dbcRepositories;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * 集成测试配置类
 * 
 * 为@DataR2dbcTest提供必要的Spring Boot配置
 * 
 * @author 张翔
 * @date 2026-04-02
 */
@SpringBootConfiguration
@EnableAutoConfiguration
@EnableR2dbcRepositories(basePackages = {
    "cn.novalon.manage.db.repository"
})
public class IntegrationTestConfig {

    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder(12);
    }
}
