-
Java How to compare String
In Java, we use equals() to compare String.
Date: 2019-08-11 View: 1314
-
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: 1305
-
Java – Convert Integer to String
In Java, you can use String.valueOf() to convert an Integer to String.
Date: 2019-08-11 View: 1330
-
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: 3768
-
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: 1506
-
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: 1286
-
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: 1627
-
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: 1693
-
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: 7787
-
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: 1491
-
JDBC PreparedStatement SQL IN condition
Java JDBC PreparedStatement example to create a SQL IN condition.
Date: 2019-08-11 View: 1724