Springboot startup error: java.lang.IllegalArgumentException : Property ‘sqlSessionFactory’ or ‘sqlSessionTempla

Refer to this blog: https://www.cnblogs.com/dbaxyx/p/10663485.html

Error information:

Caused by: java.lang.IllegalArgumentException : Property ‘sqlSessionFactory’ or ‘sqlSessionTemplate’ are required
    at org.springframework.util . Assert.notNull ( Assert.java:198 )
    at org.mybatis.spring . support.SqlSessionDaoSupport.checkDaoConfig ( SqlSessionDaoSupport.java:74 )
    at org.mybatis.spring . mapper.MapperFactoryBean.checkDaoConfig ( MapperFactoryBean.java:90 )
    at org.springframework.dao . support.DaoSupport.afterPropertiesSet ( DaoSupport.java:44 )
    at org.springframework.beans . factory.support.AbstractAutowireCapableBeanFactory .invokeInitMethods(AbstractAutowi reCapableBeanFactory.java:1837 )
    at org.springframework.beans . factory.support.AbstractAutowireCapableBeanFactory .initializeBean(AbstractAutowi reCapableBeanFactory.java:1774 )
    … 56 common frames omitted

This is because there is no package introduced:

<dependency>
    <groupId>org.mybatis.spring.boot</groupId>
    <artifactId>mybatis-spring-boot-starter</artifactId>
    <version>1.3.2</version>
</dependency>

Just import (pay attention to jar package conflicts)

Read More: