Spring Security and database