春の統合MyBatisのステップ

アイデア:

SqlsessionFactory - > SQLSESSION - > StudentMapper - > CRUD

  1. インポートジャー
    ここに画像を挿入説明
  2. テストデータ準備- (タイプ表)
    のような、学生を(stuno、氏名、年齢 )
  3. studentMapper.xmlを作成および構成
    ここに画像を挿入説明
  4. MyBatisの設定ファイル
    ここに画像を挿入説明
  5. StudentDaoImplを書きます
    ここに画像を挿入説明
  6. プロファイルdb.propertiesを作成します。
    ここに画像を挿入説明
  7. 春のコンフィギュレーション・ファイルに導入さDb.properties
    ここに画像を挿入説明
  8. MyBatisの中でデータベースを構成する前に、今すぐ設定春に
    ここに画像を挿入説明
  9. コアクラスsqlSessionFactoryBeanにspringIOCでMyBatisのを作成し、MyBatisの設定ファイルは、春にロードされ、
    ここに画像を挿入説明
  10. IOCは、創造に(StudentDao前)StudentMapperとStudentService、有料の注意を作成しStudentMapper
    ここに画像を挿入説明
    ここに画像を挿入説明
リリース8元の記事 ウォンの賞賛0 ビュー76

おすすめ

転載: blog.csdn.net/flipped___/article/details/104303205