package com;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

import org.springframework.security.crypto.password.PasswordEncoder;

import com.bankaudit.spring.config.BankAuditConfig;
import com.bankaudit.spring.config.SHA256PasswordEncoder;

@SpringBootApplication
@EnableScheduling
@EnableAsync
@Configuration
public class OpenLedgerApplication {

	public static void main(String[] args) {
		SpringApplication.run(OpenLedgerApplication.class, args);
	}

	@Bean
	public BankAuditConfig bauAppConfig() {
		return new BankAuditConfig();
	}

	@Bean
	PasswordEncoder passwordEncoder(){
		return new SHA256PasswordEncoder();
	}
}
