如何执行mybatis-spring-boot-starter-test?

Bing Zhao :

对于mybatis-spring-boot-starter-test,我看不到任何主要方法,甚至没有Java文件。它有两个依赖关系,其中mybatis-spring-boot-test-autoconfigure包含一些测试文件,而当spring-boot-starter-test只有pom文件时,我可以执行它们

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
  <groupId>org.mybatis.spring.boot</groupId>
  <artifactId>mybatis-spring-boot-test-autoconfigure</artifactId>
</dependency>

那么如何执行这些测试模块呢?我不能,它是为什么创建的?

疯子:

该模块不适用于“执行”。看看他们的文档

什么是MyBatis-Spring-Boot-Starter-Test?

MyBatis-Spring-Boot-Starter-Test帮助使用MyBatis-Spring-Boot-Starter创建MyBatis组件的测试用例

通过使用此模块,您将可以:

  • 可以使用@MybatisTest安装测试组件来测试纯MyBatis组件
  • 可以导入依赖项工件以对纯MyBatis组件执行测试

因此,此模块提供@MybatisTestmybatis-spring-boot-test-autoconfigure基本上,这就是“启动器”:一组(可能是这种情况下的)依赖项,旨在一起提供一些功能。

阅读有关使用@MybatisTest的更多信息。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Spring Boot-Spring Boot Starter执行器问题

找不到SpringApplicationConfiguration:错误的spring-boot-starter-test内容?

spring-boot-test和spring-boot-starter-test有什么区别?

识别正确的Spring Boot Starter

使用Spring Boot Starter Test在单元测试中获取异常对象

依赖 spring-boot-starter-test 未在多模块 Maven 项目中继承

Spring-boot-starter-test无法运行数据库集成测试

由 pom.xml 中的依赖 spring-boot-starter-test 拉取的罐子

Eclipse Spring Boot Starter项目出现错误

什么是“ spring-boot-starter”罐子?

spring boot starter 邮件空指针异常

Spring Boot Starter批注元数据

Tomcat和spring-boot-starter

spring-boot-starter 只包含

Maven-Spring Boot Starter的版本

Spring Boot Web Starter找不到JSP

Spring Boot Starter缓存-速度丢失了吗?

如何同时使用 spring-cloud-starter-config 和 spring-boot-devtools?

Gradle,Spring Boot,spring-boot-starter-data-jpa升级

Spring Boot - @EnableScheduling 结合 spring-boot-starter-quartz

spring initializr:spring-boot-starter vs spring-boot-starter-web

使用JUnit5和Spring-boot-starter-parent时不执行任何测试

在类路径中具有“ spring-boot-starter-test”依赖项时,无法启动tomcat服务器

optaplanner-spring-boot-starter vs kie-server-spring-boot-starter

spring-boot-starter-tomcat和spring-boot-starter-web

如何在不从spring-boot-starter-web继承的情况下在Spring Boot中获得ObjectMapper实例?

如何在不继承“ spring-boot-starter-parent”模块的情况下测试Spring-Boot应用程序?

尽管Spring-boot-starter-parent中存在Spring-boot-test依赖项,但必须手动导入它们-为什么?

如何在spring-boot-starter-data-rest中为Swagger文档实现snake_case?