-
Spring REST Validation Example
In this article, we will enhance the previous Spring REST Hello World example, by adding bean validation and custom validator.
Date: 2019-08-11 View: 953
-
Spring Boot Test unable to autowired MockMvc
Spring Boot integeration test, but unable to @Autowired MockMvc
Date: 2019-08-11 View: 1443
-
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?
Date: 2019-08-11 View: 1852
-
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)
Date: 2019-08-11 View: 1121
-
JSONAssert How to unit test JSON data
In Java, we can use JSONAssert to unit test JSON data easily.
Date: 2019-08-11 View: 1974
-
Spring REST Error Handling Example
In this article, we will show you error handling in Spring Boot REST application.
Date: 2019-08-11 View: 1737
-
Mockito How to mock repository findById thenReturn() Optional?
Try to mock a repository findById method, but no idea use thenReturn() to return an object, as it accepts an Optional?
Date: 2019-08-11 View: 2339
-
Java How to compare String
In Java, we use equals() to compare String.
Date: 2019-08-11 View: 1150
-
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.
Date: 2019-08-11 View: 1094
-
Java – Convert Integer to String
In Java, you can use String.valueOf() to convert an Integer to String.
Date: 2019-08-11 View: 1172
-
Spring + Mockito Unable to mock save method?
Try to mock a repository save() method, but it is always returning null?
Date: 2019-08-11 View: 1656
-
Spring Test How to test a JSON Array in jsonPath
In Spring, we can use Hamcrest APIs like hasItem and hasSize to test a JSON Array. Review the following example :
Date: 2019-08-11 View: 3463
-
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.
Date: 2019-08-11 View: 916
-
Linux script to backup MySQL to Amazon S3
A shell script to backup MYSQL database and upload it to Amazon S3.
Date: 2019-08-11 View: 1453
-
Java 8 How to sort list with stream.sorted()
Few examples to show you how to sort a List with stream.sorted()
Date: 2019-08-11 View: 1350