-
Java – Convert Integer to String
In Java, you can use String.valueOf() to convert an Integer to String.
Date: 2019-08-11 View: 1328
-
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: 1925
-
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: 3766
-
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: 1048
-
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: 1685
-
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: 1505
-
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: 1284
-
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: 1625
-
Java How to declare and initialize an Array
Few Java examples to declare, initialize and manipulate Array in Java
Date: 2019-08-11 View: 1776
-
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: 1692
-
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: 7782
-
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: 1489
-
JDBC PreparedStatement SQL IN condition
Java JDBC PreparedStatement example to create a SQL IN condition.
Date: 2019-08-11 View: 1723
-
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: 1421
-
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: 1966