-
Spring Boot + JUnit 5 + Mockito
In this article, we will show you how to do Spring Boot 2 integration test with JUnit 5, and also Mockito.
2019-08-11【[Java]】
阅读更多 -
Mockito when() requires an argument which has to be a method call on a mock
Run the following Spring Boot + JUnit 5 + Mockito integration test.
2019-08-11【[Java]】
阅读更多 -
Spring REST Hello World Example
In this article, we will show you how to develop a Spring Boot REST style web service to handle CRUD operations from a H2 In-memory database.
2019-08-11【[Java]】
阅读更多 -
Spring Boot Test unable to autowired MockMvc
Spring Boot integeration test, but unable to @Autowired MockMvc
2019-08-11【[Java]】
阅读更多 -
Spring Security There is no PasswordEncoder mapped for the id null
Send a GET request with username and password, but hits the password encoder error?
2019-08-11【[Java]】
阅读更多 -
Spring REST + Spring Security Example
In this article, we will enhance the previous Spring REST Validation Example, by adding Spring Security to perform authentication and authorization for the requested URLs (REST API endpoints)
2019-08-11【[Java]】
阅读更多 -
Spring Boot How to init a Bean for testing?
In Spring Boot, we can create a @TestConfiguration class to initialize some beans for testing class only.
2019-08-11【[Java]】
阅读更多 -
Spring + Mockito Unable to mock save method?
Try to mock a repository save() method, but it is always returning null?
2019-08-11【[Java]】
阅读更多 -
Spring REST Integration Test Example
In this article, we will show you how to test the Spring Boot REST application. Normally, we use the MockMvc or TestRestTemplate for the integration test.
2019-08-11【[Java]】
阅读更多 -
Spring Boot Run code when the application starts
In Spring Boot, we can create a CommandLineRunner bean to run code when the application is fully started.
2019-08-11【[Java]】
阅读更多 -
Spring Boot YAML example
In this article, we will show you how to use YAML instead of properties file in Spring Boot.
2019-08-11【[Java]】
阅读更多 -
Spring Boot + Spring data JPA
In this tutorial, we will show you how to use Spring Boot + Spring data JPA to save data into an H2 in-memory database and how to also query the data.
2019-08-11【[Java]】
阅读更多 -
Spring Boot + Spring data JPA + MySQL
The previous Spring Boot + Spring data JPA will be reused, modify to support MySQL database.
2019-08-11【[Java]】
阅读更多 -
Spring Boot MySQL : Table DB_NAME.hibernate_sequence doesnt exist
Spring Boot + Spring Data JPA + MySQL, and hits the following error message when the application starts :
2019-08-11【[Java]】
阅读更多 -
Spring Boot + Spring data JPA + PostgreSQL
The previous Spring Boot + Spring data JPA will be reused, modify to support PostgreSQL database.
2019-08-11【[Java]】
阅读更多