アイデア:
SqlsessionFactory - > SQLSESSION - > StudentMapper - > CRUD
- インポートジャー
- テストデータ準備- (タイプ表)
のような、学生を(stuno、氏名、年齢 ) - studentMapper.xmlを作成および構成
- MyBatisの設定ファイル
- StudentDaoImplを書きます
- プロファイルdb.propertiesを作成します。
- 春のコンフィギュレーション・ファイルに導入さDb.properties
- MyBatisの中でデータベースを構成する前に、今すぐ設定春に
- コアクラスsqlSessionFactoryBeanにspringIOCでMyBatisのを作成し、MyBatisの設定ファイルは、春にロードされ、
- IOCは、創造に(StudentDao前)StudentMapperとStudentService、有料の注意を作成しStudentMapper