// Path: src/main/java/com/raibledesigns/dao/UserDao.java
// public interface UserDao extends GenericDao<User, Long>, UserDetailsService {
// 
//     /**
//      * Gets users information based on login name.
//      * @param username the user's username
//      * @return userDetails populated userDetails object
//      * @throws org.springframework.security.core.userdetails.UsernameNotFoundException thrown when user not found in database
//      */
//     @Transactional
//     UserDetails loadUserByUsername(String username) throws UsernameNotFoundException;
// 
//     /**
//      * Gets a list of users ordered by the uppercase version of their username.
//      *
//      * @return List populated list of users
//      */
//     List<User> getUsers();
// 
//     /**
//      * Saves a user's information.
//      * @param user the object to be saved
//      * @return the persisted User object
//      */
//     User saveUser(User user);
// 
//     /**
//      * Retrieves the password in DB for a user
//      * @param userId the user's id
//      * @return the password in DB, if the user is already persisted
//      */
//     @Transactional(propagation = Propagation.NOT_SUPPORTED)
//     String getUserPassword(Long userId);
// }


import com.raibledesigns.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.password.PasswordEncoder;
package com.raibledesigns.config;


@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
public class SecurityConfig extends WebSecurityConfigurerAdapter {
    @Autowired
// Path: src/main/java/com/raibledesigns/dao/UserDao.java
// public interface UserDao extends GenericDao<User, Long>, UserDetailsService {
// 
//     /**
//      * Gets users information based on login name.
//      * @param username the user's username
//      * @return userDetails populated userDetails object
//      * @throws org.springframework.security.core.userdetails.UsernameNotFoundException thrown when user not found in database
//      */
//     @Transactional
//     UserDetails loadUserByUsername(String username) throws UsernameNotFoundException;
// 
//     /**
//      * Gets a list of users ordered by the uppercase version of their username.
//      *
//      * @return List populated list of users
//      */
//     List<User> getUsers();
// 
//     /**
//      * Saves a user's information.
//      * @param user the object to be saved
//      * @return the persisted User object
//      */
//     User saveUser(User user);
// 
//     /**
//      * Retrieves the password in DB for a user
//      * @param userId the user's id
//      * @return the password in DB, if the user is already persisted
//      */
//     @Transactional(propagation = Propagation.NOT_SUPPORTED)
//     String getUserPassword(Long userId);
// }


// Path: src/main/java/com/raibledesigns/config/SecurityConfig.java
import com.raibledesigns.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.password.PasswordEncoder;

package com.raibledesigns.config;


@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
public class SecurityConfig extends WebSecurityConfigurerAdapter {
    @Autowired
    private UserDao userDao;