Spring Boot JDBC Examples

In this tutorial, we will show you how to use Spring Boot JDBC JdbcTemplate and NamedParameterJdbcTemplate. Technologies used : Spring Boot 2.1.2.RELEASE Spring JDBC 5.1.4.RELEASE HikariCP 3.2.0 H2 in-memory database 1.4.197 Maven 3 Java 8 In Spring Boot JDBC, the database related beans like DataSource, JdbcTemplate and NamedParameterJdbcTemplate will be configured and created during the …

Read more

Spring embedded database examples

In this tutorial, we will show you a few examples to configure the embedded database engines like HSQL, H2 and Derby in Spring framework. Technologies used : Spring 4.1.6.RELEASE jUnit 4.1.2 Maven 3 Embedded databases tested : HSQLDB 2.3.2 H2 1.4.187 Derby 10.11.1.1 The embedded database concept is very helpful during the development phase, because …

Read more

Spring JdbcTemplate Querying Examples

Here are a few examples to show you how to use Spring JdbcTemplate to query or extract data from database. Technologies used : Spring Boot 2.1.2.RELEASE Spring JDBC 5.1.4.RELEASE Maven 3 Java 8 In Short: jdbcTemplate.queryForObject for single row or value jdbcTemplate.query for multiple rows or list Note The article is updated from Spring core …

Read more