content: package kr.co.fastcampus.eatgo;
  
  import kr.co.fastcampus.eatgo.utils.JwtUtil;
  import org.springframework.beans.factory.annotation.Value;
  import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.security.config.annotation.web.builders.HttpSecurity;
  import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
  import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
  import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
  import org.springframework.security.crypto.password.PasswordEncoder;
  
  @Configuration
  @EnableWebSecurity
  public class SecurityJavaConfig extends WebSecurityConfigurerAdapter {
  
      @Value("${jwt.secret}")
      private String secret;
  
      @Override
      protected void configure(HttpSecurity http) throws Exception {
          http
                  .cors().disable()
                  .csrf().disable()
                  .formLogin().disable()
                  .headers().frameOptions().disable();
      }
  
      @Bean
      public PasswordEncoder passwordEncoder() {
          return new BCryptPasswordEncoder();
      }
  
      @Bean
      public JwtUtil jwtUtil() {
          return new JwtUtil(secret);
      }
  
  }
  