/spring-boot-unit-test-rest-controller

Spring Boot Rest API unit test with Junit 5, Mockito, Maven

Primary LanguageJava

Spring Boot Rest API unit testing with Junit 5, Mockito, Maven

Apply Spring Boot @WebMvcTest for Rest Controller Unit Test with JUnit 5 and Mockito.

For more detail, please visit:

Spring Boot Rest Controller Unit Test with @WebMvcTest

The code gives you an additional unit test for following Rest APIs example:

Spring Boot + H2

Spring Boot + MySQL

Spring Boot + PostgreSQL

Spring Data + MongoDB

Spring JPA + SQL Server

Spring JPA + Oracle

Spring Data + Cassandra

More Practice:

Spring Boot Unit Test for JPA Repository example

Spring JPA @Query example: Custom query in Spring Boot

Spring JPA Native Query example in Spring Boot

Spring Boot File upload example with Multipart File

Spring Boot Pagination & Filter example | Spring JPA, Pageable

Spring Data JPA Sort/Order by multiple Columns | Spring Boot

Spring Boot Repository Unit Test with @DataJpaTest

Associations:

Spring Boot One To Many example with Spring JPA, Hibernate

Spring Boot Many To Many example with Spring JPA, Hibernate

Security:

Spring Boot + Spring Security JWT Authentication & Authorization

Deployment:

Deploy Spring Boot App on AWS – Elastic Beanstalk

Docker Compose Spring Boot and MySQL example

Fullstack:

Integrate Angular with Spring Boot Rest API

Integrate React with Spring Boot Rest API

Integrate Vue with Spring Boot Rest API

Run Spring Boot application

mvn test -Dtest=TutorialControllerTests