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 thatDataSource
as an input using theSqlSessionFactoryBean
- Will create and register an instance of a
SqlSessionTemplate
got out of theSqlSessionFactory
- 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 最高!!!
三日間設定でくよくよしていたことがやっと解決!!
一番の解決策はreferenceをじっと読んでみること!
testをおろそかにしないこと!