-
Java – Convert Integer to String
In Java, you can use String.valueOf() to convert an Integer to String.
Date: 2019-08-11 View: 1299
-
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: 1886
-
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: 3735
-
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: 1031
-
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: 1659
-
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: 1489
-
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.
Date: 2019-08-11 View: 1266
-
Spring Boot YAML example
In this article, we will show you how to use YAML instead of properties file in Spring Boot.
Date: 2019-08-11 View: 1602
-
Java How to declare and initialize an Array
Few Java examples to declare, initialize and manipulate Array in Java
Date: 2019-08-11 View: 1750
-
Java 8 How to convert IntStream to Integer[]
The key is boxed() the IntStream into a Stream<Integer>, then only convert to an Array.
Date: 2019-08-11 View: 1676
-
HikariPool-1 Connection is not available, request timed out after 30002ms.
After some SQL queries, the system is unable to get any connection from the HikariPool and prompts the following error message
Date: 2019-08-11 View: 7746
-
Java 8 Convert a Stream to Array
In Java 8, we can use .toArray() to convert a Stream into an Array.
Date: 2019-08-11 View: 1473
-
JDBC PreparedStatement SQL IN condition
Java JDBC PreparedStatement example to create a SQL IN condition.
Date: 2019-08-11 View: 1699
-
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.
Date: 2019-08-11 View: 1399
-
Spring Boot + Spring data JPA + MySQL
The previous Spring Boot + Spring data JPA will be reused, modify to support MySQL database.
Date: 2019-08-11 View: 1938