はじめに Spring Securityを使ってデータベースに保存されたユーザ、パスワードでログインする機能を作ってみたいと思います。 Spring Securityで規定されたusersテーブルのスキーマをそのまま使う分には、 Springの定義ファイルを編集するするだけでよいのですが このusersテーブルに他の項目を追加してログインセッションに置きたい場合は、カスタマイズが必要になります。 ログインが成功した場合、セッションキー「SPRING_SECURITY_CONTEXT」にusersテーブルの情報が置かれます。 カスタマイズとしては、UserDetailsインターフェイス(org.springframework.security.core.userdetails)実装クラスと UserDetailsServiceインターフェイス(org.springframework.secu