0305勉強

Quick Setup

As you may already know, to use MyBatis with Spring you need at least an SqlSessionFactory and at least one mapper interface.

MyBatis-Spring-Boot-Starter will:

  • Autodetect an existing DataSource
  • Will create and register an instance of a SqlSessionFactory passing that DataSource as an input using the SqlSessionFactoryBean
  • Will create and register an instance of a SqlSessionTemplate got out of the SqlSessionFactory
  • Auto-scan your mappers, link them to the SqlSessionTemplate and register them to Spring context so they can be injected into your beans

Spring Boot 最高!!!

 

f:id:mari20201101:20210305231511p:plain

 

三日間設定でくよくよしていたことがやっと解決!!

一番の解決策はreferenceをじっと読んでみること!

testをおろそかにしないこと!