title: SpringBoot - Unknown Column "Enable"
body: <p>Can anyone help me with this error? </p>
  
  <pre><code>org.springframework.security.authentication.InternalAuthenticationServiceException: PreparedStatementCallback; bad SQL grammar [select username,password,enabled from users where username = ?]; nested exception is java.sql.SQLSyntaxErrorException: Unknown column 'enabled' in 'field list'
  </code></pre>
  
  <p>When I'm logging in, I input the right username and password base from MySQL DB.
  I don't even use encryption on my password and Not even using column "enabled" on my DB. </p>
  
  <p>Any tutorial or suggestion would help me. Thank you, guys!</p>
  
  <pre><code>@Configuration
  @EnableWebSecurity
  public class SecurityConfig extends WebSecurityConfigurerAdapter {
      // add a reference to our security data source
  
          @Autowired
          @Qualifier("appDataSource")
          private DataSource appDataSource;
  
          @Override
          protected void configure(AuthenticationManagerBuilder auth) throws Exception {
  
              // use jdbc authentication ... oh yeah!!!       
              auth.jdbcAuthentication().dataSource(appDataSource);
  
          }
  
          @Override
          protected void configure(HttpSecurity http) throws Exception {
  
              http
                  .csrf().disable()
                  .authorizeRequests()
                  .antMatchers("/", "index", "/resources/**", "/css/**", "/js/**", "/image/**","/templates/**").permitAll()
                  .anyRequest()
                  .authenticated()
                  .and()
                  .formLogin()
                      .loginPage("/login")
                      .loginProcessingUrl("/authenticateCredentials")
                      .defaultSuccessUrl("/")
                  .and()
                  .logout()
                      .logoutSuccessUrl("/login")  // after logout redirect to landing page (root)
                      .permitAll()
                  .and()
                  .exceptionHandling().accessDeniedPage("/access-denied");
  
          }
  
  }
  
  
  
  
  
  @Controller
  @RequestMapping("/users")
  public class UserController {
  
  
      private UserService userService;
  
      @Autowired
      public UserController (UserService userService){
          this.userService = userService;
      }
  
  
      @PostMapping("/add")
      public String addEmployee(@ModelAttribute("user") User user) {
  
          //add user
          this.userService.save(user);
  
          return "redirect:/index.html";
      }
  }
  </code></pre>