springBoot integration mybatis h3>
#springBoot integration with the first mybatis project
1. Create a new normal maven project
2. Use idea’s easycode to automatically generate the controller, entity, service and dao layer code
3. Simple pom configuration, independent of error
java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class tk.mybatis.spring.annotation.MapperScan.factoryBean()
引用>
依赖如下:
<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.0</version> </dependency> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.4</version> </dependency>
引用>
4. 配置简单的yml,不配置会报找不到
mybatis:
mapper-locations:类路径:mapper/* . xml p>
引用>
div>Read More:
- Solution to the failure of springboot integrated PageHelper
- Springboot + mybatis + logback does not print SQL problems on the console
- Springboot + mybatis plus transaction management
- The springboot integration mybatis reported an error. The parameter cannot be found
- Error: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2
- The jar package download of Maven project appears (could not transfer artifact. Org mybatis:mybatis )
- Failed to retrieve plugin descriptor for org.mybatis.generator :mybatis-generator
- IntelliJ idea community community integrated Tomcat or jetty tutorial
- Mybatis idea environment integration jar package
- Dell R610 server PCIE Training Error: Integrated RAID error
- Related configuration of mybatis project
- [Solved] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zyh.springboot.
- Springboot startup error: java.lang.IllegalArgumentException : Property ‘sqlSessionFactory’ or ‘sqlSessionTempla
- Add PageHelper spring boot starter dependency to springboot and report an error
- Springboot error: property ‘sqlsessionfactory’ or ‘sqlsessiontemplate’ are required error details
- Mybatis-plus automatically generates code error [Solved]
- Springboot project startup exception – required a single bean, but 2 were found
- Springboot startup error [extshutdown hook]
- Solve the problem that springboot does not scan @ repository
- Failed to determine a suitable driver class error in mybatis