<div dir="ltr" style="text-align: justify;">
<div style="font-family: calibri, sans-serif; text-align: justify;">
<div style="font-size: 12pt;">
<div style="font-size: 12pt;">Hello friends here I am going to explain how to use <b>SQL Database</b> or <b>Embedded Databases</b> with Spring Boot. The Spring Framework provides extensive support for working with SQL databases. SQL Databases are an integral part of any application being development. They help in persisting application data. Spring provides a nice abstraction on top of JDBC API using <b>JdbcTemplate </b>and also provides great transaction management capabilities using annotation based approach. Spring provides support for any <b>ORM </b>tools like <b>Hibernate</b>. Spring Data provides an additional level of functionality, creating Repository implementations directly from interfaces and using conventions to generate queries from your method names.</div>
<h2 style="font-size: 12pt;"><b>Configuring a DataSource</b></h2>
<div style="font-size: 12pt;">We can configure <b>DataSource </b>with Spring Boot for two type databases as below</div>
<div style="font-size: 12pt;"></div>
<ol style="font-size: 12pt;">
<li>Configure Embedded Database or In Memory Database</li>
<li>Configure Production Database</li>
<li>Configure Database by using JNDI</li>
</ol>
<h2 style="font-size: 12pt;"> <b>1. Configure Embedded Database or In Memory Database</b></h2>
<div style="font-size: 12pt;">For development environment for any project it’s often convenient to select an in-memory embedded database. Obviously, in-memory databases do not provide persistent storage; you will need to populate your database when your application starts and be prepared to throw away data when your application ends. Spring Boot auto configure databases like H2, HSQL and Derby etc. You don’t need to provide any connection URLs, simply include a build dependency to the embedded database that you want to use.</div>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">Let’s see <b>pom.xml</b> file</div>
<pre class="highlight" style="font-size: 12pt;"><;dependencies>; 
 <;dependency>; 
 <;groupId>;org.springframework.boot<;/groupId>; 
 <;artifactId>;spring-boot-starter-web<;/artifactId>; 
 <;/dependency>; 
 
 <;dependency>; 
 <;groupId>;org.hsqldb<;/groupId>; 
 <;artifactId>;hsqldb<;/artifactId>; 
 <;scope>;runtime<;/scope>; 
 <;/dependency>; 
 <;dependency>; 
 <;groupId>;org.springframework.boot<;/groupId>; 
 <;artifactId>;spring-boot-starter-test<;/artifactId>; 
 <;scope>;test<;/scope>; 
 <;/dependency>; 
 <;dependency>; 
 <;groupId>;org.springframework.boot<;/groupId>; 
 <;artifactId>;spring-boot-starter-jdbc<;/artifactId>; 
 <;/dependency>; 
 <;/dependencies>; 
</pre>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;"></div>
<ul style="font-size: 12pt;">
<li>The <b>spring-boot-starter-jdbc</b> module transitively pulls <b>tomcat-jdbc-{version}.jar</b> which is used to configure the <b>DataSource </b>bean. In the above dependencies we have included the JDBC dependency – this gives us <b>JdbcTemplate </b>and other JDBC libraries, the <b>org.hsqldb</b> dependency adds embedded <b>hsqldb</b>.</li>
<li>If you have not defined any <b>DataSource </b>bean explicitly and if you have any embedded database driver in classpath such as<b> H2, HSQL</b> or <b>Derby </b>then SpringBoot will automatically registers DataSource bean using <b>in-memory</b> database settings.</li>
<li>These embedded DBs are in-memory and each time the application shuts down the schema and data gets erased. One way to keep schema and data in the in-memory is to populate it during application startup. This is taken care by Spring Boot.</li>
<li>We can have <b>schema.sql</b> and <b>data.sql</b> files in root classpath which SpringBoot will automatically use to initialize database. Spring JDBC uses these sql files to create schema and populate data into the schema.</li>
</ul>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">In addition to <b>schema.sql </b>and <b>data.sql</b>, Spring Boot will load <b>schema-${platform}.sql</b> and <b>data-${platform}.sql </b>files if they are available in root classpath. One can create multiple <b>schema.sql</b> and <b>data.sql</b> files, one for each db platform. So we can have <b>schema-hsqldb.sql</b>, <b>data-hsqldb.sql</b>, <b>schema-mysql.sql</b> and so on. And the file to be picked is decided by the value assigned to the property <b>spring.datasource.platform</b>. In this post we are going to create a <b>schema-hsqldb.sql</b> file with the following contents:</div>
<pre class="highlight" style="font-size: 12pt;">CREATE TABLE users(userId INTEGER NOT NULL,userName VARCHAR(100) NOT NULL,userEmail VARCHAR(100) DEFAULT NULL,address VARCHAR(100) DEFAULT NULL,PRIMARY KEY (userId));</pre>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">Create <b>data.sql </b>in <b>src/main/resources</b> as follows:</div>
<pre class="highlight" style="font-size: 12pt;">insert into users(userId, userName, userEmail, address) values (1000, 'Dinesh', 'dinesh@gmail.com', 'Delhi'); 
insert into users(userId, userName, userEmail, address) values (1001, 'Kumar', 'kumar@gmail.com', 'Greater Noida'); 
insert into users(userId, userName, userEmail, address) values (1002, 'Rajput', 'rajput@gmail.com', 'Noida'); 
</pre>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">Next is to create the <b>User.java </b>model class:</div>
<pre class="highlight" style="font-size: 12pt;">/** 
 * 
 */ 
package com.dineshonjava.model; 
 
/** 
 * @author Dinesh.Rajput 
 * 
 */ 
public class User { 
 private Integer userId; 
 private String userName; 
 private String userEmail; 
 private String address; 
 public Integer getUserId() { 
 return userId; 
 } 
 public void setUserId(Integer userId) { 
 this.userId = userId; 
 } 
 public String getUserName() { 
 return userName; 
 } 
 public void setUserName(String userName) { 
 this.userName = userName; 
 } 
 public String getUserEmail() { 
 return userEmail; 
 } 
 public void setUserEmail(String userEmail) { 
 this.userEmail = userEmail; 
 } 
 public String getAddress() { 
 return address; 
 } 
 public void setAddress(String address) { 
 this.address = address; 
 } 
 @Override 
 public String toString() { 
 return "User [userId=" + userId + ", userName=" + userName 
 + ", userEmail=" + userEmail + ", address=" + address + "]"; 
 } 
 
} 
</pre>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">Next is to create a service class <b>UserService </b>which makes use of <b>JdbcTemplate</b> to insert data and retrieve data from <b>hsqldb</b>. There are two methods in the service class- <b>createUser </b>and <b>findAllUsers</b>. <b>createUser </b>adds a new row to the user table and <b>findAllUsers </b>fetches all the rows in the user table. Below is the <b>UserService.java </b>class definition:</div>
<pre class="highlight" style="font-size: 12pt;">/** 
 * 
 */ 
package com.dineshonjava.service; 
 
import java.sql.Connection; 
import java.sql.PreparedStatement; 
import java.sql.SQLException; 
import java.sql.Statement; 
import java.util.List; 
 
import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.jdbc.core.JdbcTemplate; 
import org.springframework.jdbc.core.PreparedStatementCreator; 
import org.springframework.jdbc.support.GeneratedKeyHolder; 
import org.springframework.jdbc.support.KeyHolder; 
import org.springframework.stereotype.Service; 
import org.springframework.transaction.annotation.Transactional; 
 
import com.dineshonjava.model.User; 
import com.dineshonjava.utils.UserRowMapper; 
 
/** 
 * @author Dinesh.Rajput 
 * 
 */ 
@Service 
public class UserService { 
 
 @Autowired 
 private JdbcTemplate jdbcTemplate; 
 
 @Transactional(readOnly=true) 
 public List<;User>; findAll() { 
 return jdbcTemplate.query("select * from users", 
 new UserRowMapper()); 
 } 
 
 @Transactional(readOnly=true) 
 public User findUserById(int id) { 
 return jdbcTemplate.queryForObject( 
 "select * from users where userId=?", 
 new Object[]{id}, new UserRowMapper()); 
 } 
 
 public User create(final User user) 
 { 
 final String sql = "insert into users(userId,userName,userEmail,address) values(?,?,?,?)"; 
 
 KeyHolder holder = new GeneratedKeyHolder(); 
 jdbcTemplate.update(new PreparedStatementCreator() { 
 @Override 
 public PreparedStatement createPreparedStatement(Connection connection) throws SQLException { 
 PreparedStatement ps = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); 
 ps.setInt(1, user.getUserId()); 
 ps.setString(2, user.getUserName()); 
 ps.setString(3, user.getUserEmail()); 
 ps.setString(4, user.getAddress()); 
 return ps; 
 } 
 }, holder); 
 
 int newUserId = holder.getKey().intValue(); 
 user.setUserId(newUserId); 
 return user; 
 } 
} 
 
 
/** 
 * 
 */ 
package com.dineshonjava.utils; 
 
import java.sql.ResultSet; 
import java.sql.SQLException; 
 
import org.springframework.jdbc.core.RowMapper; 
 
import com.dineshonjava.model.User; 
 
/** 
 * @author Dinesh.Rajput 
 * 
 */ 
public class UserRowMapper implements RowMapper<;User>;{ 
 
 @Override 
 public User mapRow(ResultSet rs, int rowNum) throws SQLException { 
 User user = new User(); 
 user.setUserId(rs.getInt("userId")); 
 user.setUserName(rs.getString("userName")); 
 user.setUserEmail(rs.getString("userEmail")); 
 user.setAddress(rs.getString("address")); 
 return user; 
 } 
 
} 
 
</pre>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">Now creating main application class and controller create users into user table and fetching all users from the table as json format.</div>
<div style="font-size: 12pt;"></div>
<pre class="highlight" style="font-size: 12pt;">/** 
 * 
 */ 
package com.dineshonjava.controller; 
 
import java.util.List; 
 
import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.web.bind.annotation.RequestMapping; 
import org.springframework.web.bind.annotation.RestController; 
 
import com.dineshonjava.model.User; 
import com.dineshonjava.service.UserService; 
 
/** 
 * @author Dinesh.Rajput 
 * 
 */ 
@RestController 
public class UserController { 
 
 @Autowired 
 UserService userService; 
 
 @RequestMapping("/") 
 User home(User user) { 
 user = userService.create(user); 
 return user; 
 } 
 
 @RequestMapping("/users") 
 List<;User>; findAllUsers() { 
 List<;User>; users = userService.findAll(); 
 return users; 
 } 
} 
 
</pre>
<div style="font-size: 12pt;">Now let&#8217;s see main class of application <b>SpringBootDataBaseApplication.java</b></div>
<pre class="highlight" style="font-size: 12pt;">package com.dineshonjava; 
 
import org.springframework.boot.SpringApplication; 
import org.springframework.boot.autoconfigure.SpringBootApplication; 
 
@SpringBootApplication 
public class SpringBootDataBaseApplication { 
 
 public static void main(String[] args) { 
 SpringApplication.run(SpringBootDataBaseApplication.class, args); 
 } 
} 
 
</pre>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">Following is the <b>project structure</b> whatever we made.</div>
<div style="font-size: 12pt;"></div>
<div class="separator" style="clear: both; font-size: 12pt; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2016/08/Spring-Boot-SQL-Database.jpg" border="0" /></div>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">Now run this application as Spring Boot application in STS.</div>
<div style="font-size: 12pt;">Whenever hit following URL then new row has been created into table suppose.</div>
<div style="font-size: 12pt;"><b><i>http://localhost:8080/?userId=1003&;userName=Arnav&;userEmail=arnav@gmail.com&;address=Noida</i></b></div>
<div style="font-size: 12pt;">One row has been created let&#8217;s see all data with following URL</div>
<div style="font-size: 12pt;"><b>http://localhost:8080/users</b></div>
<div style="font-size: 12pt;">This display all users from database as JSON format in the browser as below</div>
<div class="separator" style="clear: both; font-size: 12pt; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2016/08/Spring-Boot-SQL-Database-2.jpg" border="0" /></div>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">We have learned how to get started quickly with Embedded database. What if we want to use Non-Embedded databases like <b>MySQL</b>, <b>Oracle </b>or <b>PostgreSQL </b>etc? <b>In-memory databases</b> have lot of restriction and are useful in the early stages of the application and that too in local environments. As the application development progresses we would need data to be present even after application ends.</div>
<div style="font-size: 12pt;"></div>
<h2 style="font-size: 12pt;"><b>2. Configure Production Database</b></h2>
<div style="font-size: 12pt;">In the production environment In Memory database is not good choice because of there are lots of limitations. For production environment we can use any database like <b>MySQL, DB2, Oracle, PostgreSQL</b> etc. Production database connections can also be auto-configured using a pooling DataSource. Here’s the algorithm for choosing a specific implementation:</div>
<div style="font-size: 12pt;"></div>
<ul style="font-size: 12pt;">
<li>First we prefer the <b>Tomcat pooling DataSource </b>for its performance and concurrency, so if that is available we always choose it.</li>
<li>Otherwise, if <b>HikariCP </b>is available we will use it.</li>
<li>If T<b>omcat pooling datasource</b> and <b>HikariCP </b>are not available then we can choose <b>Commons DBCP</b>, but we don’t recommend it in production.</li>
<li>Lastly, if Commons <b>DBCP2 </b>is available we will use it.</li>
</ul>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">If you use the <b>spring-boot-starter-jdbc</b> or <b>spring-boot-starter-data-jpa</b> ‘<b>starters</b>’ you will automatically get a dependency to <b>tomcat-jdbc</b>.</div>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">We can configure the database properties in <b>application.properties</b> file so that <b>SpringBoot</b> will use those jdbc parameters to configure <b>DataSource </b>bean.</div>
<div style="font-size: 12pt;"></div>
<pre class="highlight" style="font-size: 12pt;">spring.datasource.driver-class-name=com.mysql.jdbc.Driver 
spring.datasource.url=jdbc:mysql://localhost:3306/dojdb 
spring.datasource.username=root 
spring.datasource.password=root 
</pre>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">For any reason if you want to have more control and configure DataSource bean by yourself then you can configure DataSource bean in a Configuration class. If you register DataSource bean then SpringBoot will not configure DataSource automatically using AutoConfiguration.</div>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">You could also customize many additional settings for connection pooling either<b> tomcat connection pooling (spring.datasource.tomcat.*)</b> or any else like <b>HikariCP (spring.datasource.hikari.*)</b>, <b>DBCP (spring.datasource.dbcp.*) </b>and <b>DBCP2 (spring.datasource.dbcp2.*)</b> as following:</div>
<pre class="highlight" style="font-size: 12pt;"># Number of ms to wait before throwing an exception if no connection is available. 
spring.datasource.tomcat.max-wait=10000 
# Maximum number of active connections that can be allocated from this pool at the same time. 
spring.datasource.tomcat.max-active=50 
# Validate the connection before borrowing it from the pool. 
spring.datasource.tomcat.test-on-borrow=true 
</pre>
<div style="font-size: 12pt;"></div>
<h2 style="font-size: 12pt;"><b>Using another Connection Pooling library</b></h2>
<div style="font-size: 12pt;">By default Spring Boot pulls in <b>tomcat-jdbc-{version}.jar</b> and uses <b>org.apache.tomcat.jdbc.pool.DataSource</b> to configure <b>DataSource </b>bean. Spring Boot check the availability of classes in the classpath in following order by default:</div>
<div style="font-size: 12pt;"></div>
<ul>
<li>org.apache.tomcat.jdbc.pool.DataSource</li>
<li>com.zaxxer.hikari.HikariDataSource</li>
<li>org.apache.commons.dbcp.BasicDataSource</li>
<li>org.apache.commons.dbcp2.BasicDataSource</li>
</ul>
<p> ;</p>
<div style="font-size: 12pt;">If you want to override default behavior suppose you want use <b>HikariDataSource </b>then you can exclude <b>tomcat-jdbc</b> and add <b>HikariCP </b>dependency as follows:</div>
<div style="font-size: 12pt;"></div>
<pre class="highlight" style="font-size: 12pt;"><;dependency>; 
 <;groupId>;org.springframework.boot<;/groupId>; 
 <;artifactId>;spring-boot-starter-jdbc<;/artifactId>; 
 <;exclusions>; 
 <;exclusion>; 
 <;groupId>;org.apache.tomcat<;/groupId>; 
 <;artifactId>;tomcat-jdbc<;/artifactId>; 
 <;/exclusion>; 
 <;/exclusions>; 
<;/dependency>; 
 
<;dependency>; 
 <;groupId>;com.zaxxer<;/groupId>; 
 <;artifactId>;HikariCP<;/artifactId>; 
<;/dependency>; 
 
</pre>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">With this dependency configuration <b>SpringBoot </b>will use <b>HikariCP </b>to configure <b>DataSource </b>bean.</div>
<div style="font-size: 12pt;"></div>
<h2 style="font-size: 12pt;"><b>3. Connection to a JNDI DataSource</b></h2>
<div style="font-size: 12pt;">If you are deploying your Spring Boot application to an Application Server you might want to configure and manage your DataSource using your Application Servers built-in features and access it using JNDI.</div>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">The <b>spring.datasource.jndi-name</b> property can be used as an alternative to the <b>spring.datasource.url,</b> <b>spring.datasource.username</b> and <b>spring.datasource.password</b> properties to access the <b>DataSource </b>from a specific JNDI location.</div>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">For example, the following section in <b>application.properties</b> shows how you can access a Tomcat AS defined DataSource:</div>
<pre class="highlight" style="font-size: 12pt;">spring.datasource.jndi-name=java:tomcat/datasources/users 
</pre>
<div style="font-size: 12pt;"></div>
<h2><b>JPA &; Spring Data with Spring Boot</b></h2>
<div style="font-size: 12pt;">In this section we will see how the same can be achieved using Java <b>Persistance </b>API. Spring Data provides excellent mechanism to achieve the persistence using JPA. The Java Persistence API is a standard technology that allows you to ‘map’ objects to relational databases. The <b>spring-boot-starter-data-jpa</b> POM provides a quick way to get started. It provides the following key dependencies:</div>
<div style="font-size: 12pt;"></div>
<ul>
<li><b>Hibernate </b>— One of the most popular JPA implementations.</li>
<li><b>Spring Data JPA —</b> Makes it easy to implement JPA-based repositories.</li>
<li><b>Spring ORMs </b>— Core ORM support from the Spring Framework.</li>
</ul>
<p> ;</p>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">Update <b>pom.xml</b> with adding following line for Spring Data JPA implementation.</div>
<pre class="highlight" style="font-size: 12pt;"><;dependency>; 
 <;groupId>;org.springframework.boot<;/groupId>; 
 <;artifactId>;spring-boot-starter-data-jpa<;/artifactId>; 
<;/dependency>; 
 
</pre>
<div style="font-size: 12pt;"><b>Entity Classes</b></div>
<div style="font-size: 12pt;">Next is to create an entity class that maps to the underlying table. Let us create User as shown below:</div>
<pre class="highlight" style="font-size: 12pt;">@Entity 
public class User implements Serializable{ 
@Id 
 private Integer userId; 
private String userName; 
 private String userEmail; 
private String address 
 // setters &; getters} 
 
 
</pre>
<h2 style="font-size: 12pt;"><b>Spring Data JPA Repositories</b></h2>
<div style="font-size: 12pt;">Next is to create a repository class that will provide us with basic APIs to interact with db and also provide facility to add new APIs to interact with db. We will be using the <b>CrudRepository </b>provided by spring data. It provides us with APIs to do <b>CRUD </b>operations and some find operations like <b>findAll</b>, <b>findOne</b>, <b>count</b>.</div>
<pre class="highlight" style="font-size: 12pt;">package com.dineshonjava.domain; 
 
import org.springframework.data.domain.*; 
import org.springframework.data.repository.*; 
 
public interface UserRepository extends CrudRepository { 
 
} 
 
</pre>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;">With Spring Data we do not need to write and query for inserting data to the table. In above <b>UserRepository </b>class can have all default method provided by the <b>CrudRepository</b>.</div>
<pre class="highlight" style="font-size: 12pt;">@Service 
public class UserService { 
 
@Autowired 
 private UserRepository userRepository; 
 
 @Transactional(readOnly=true) 
 public List<;User>; findAll() { 
 return userRepository.findAll(); 
 } 
} 
</pre>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;"></div>
<h2><b>Summary</b></h2>
<div style="font-size: 12pt;">In this article we saw how we moved from in-memory database to installed databases and also saw how we could use JdbcTemplate and JPA to interact with the db. We didn’t have to write any sort of XML configuration and everything was managed by auto configuration provided by SpringBoot. Overall, you would have got good idea on how to use SQL Databases and Spring Boot together for persisting the application data.</div>
<div style="font-size: 12pt;"></div>
<div style="font-size: 12pt;"><b>For application</b> <b><a href="https://github.com/DOJ-SoftwareConsultant/SpringBootDataBase" target="_blank" rel="noopener">https://github.com/DOJ-SoftwareConsultant/SpringBootDataBase</a></b></div>
<p> ;</p>
<div style="font-size: 12pt;">Happy Spring Boot Learning!!! :)</div>
<p> ;</p>
<div style="background-color: #f2f9fc; border-radius: 3px; border: 1px solid #c9e6f2; line-height: 1.45; padding: 16px;">
<p><b>Spring Boot Related Topics</b></p>
<ol style="text-align: left;">
<li><b><a href="https://dineshonjava.com/introduction-to-spring-boot-a-spring-boot-complete-guide/">Introduction to Spring Boo</a>t</b></li>
<li><a href="https://dineshonjava.com/essentials-key-components-and-internals-of-spring-boot-framework/"><b>Essentials and Key Components of Spring Boot</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-cli-installation-and-hello-world-example/"><b>Spring Boot CLI Installation and Hello World Example</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-initilizr-web-interface-and-examples/"><b>Spring Boot Initializr Web Interface</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-initilizr-with-ides-via-spring-tool-suite/"><b>Spring Boot Initializr With IDEs</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-initializr-with-spring-boot-cli/"><b>Spring Boot Initializr With Spring Boot CLI</b></a></li>
<li><a href="https://dineshonjava.com/installing-spring-boot/"><b>Installing Spring Boot</b></a></li>
<li><a href="https://dineshonjava.com/developing-your-first-spring-boot-application-hello-world/"><b>Developing your first Spring Boot application</b></a></li>
<li><a href="https://dineshonjava.com/customizing-spring-boot-auto-configuration/"><b>External Configurations for Spring Boot Applications</b></a></li>
<li><a href="https://dineshonjava.com/logging-configuration-in-spring-boot/"><b>Logging Configuration in Spring Boot</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-with-spring-mvc-application/"><b>Spring Boot and Spring MVC</b></a></li>
<li><a href="https://dineshonjava.com/working-with-sql-databases-in-spring-boot-application/"><b>Working with SQL Databases and Spring Boot</b></a></li>
<li><a href="https://dineshonjava.com/mysql-configuration-with-spring-boot/"><b>MySQL Configurations</b></a></li>
<li><a href="https://dineshonjava.com/spring-data-jpa-using-in-spring-boot-application/"><b>Spring Data JPA using Spring Boot Application</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-with-nosql-technologies/"><b>Spring Boot with NoSQL technologies</b></a></li>
<li><a href="https://dineshonjava.com/spring-cache-tutorial/"><b>Spring Cache Tutorial</b></a></li>
<li><a href="https://dineshonjava.com/spring-security-tutorial-using-spring-boot/"><b>Spring Security Tutorial with Spring Boot</b></a></li>
<li><a href="https://dineshonjava.com/spring-boot-and-mongodb-in-rest-application/"><b>Spring Boot and MongoDB in REST Application</b></a></li>
<li><b><a href="https://dineshonjava.com/spring-boot-actuator-complete-guide/">Complete Guide for Spring Boot Actuator</a></b></li>
<li><b><a href="https://dineshonjava.com/microservices-with-spring-boot/">Microservices with Spring Boot</a></b></li>
</ol>
</div>
<p> ;</p>
</div>
</div>
</div>
<div class="wp-post-navigation"> 
									 <div class="wp-post-navigation-pre"> 
									 <a href="https://dineshonjava.com/spring-boot-with-spring-mvc-application/">Previous</a> 
									 </div> 
									 <div class="wp-post-navigation-next"> 
									 <a href="https://dineshonjava.com/mysql-configuration-with-spring-boot/">Next</a> 
									 </div> 
									</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
 $.post('https://dineshonjava.com/wp-admin/admin-ajax.php', {action: 'mts_view_count', id: '136'});
});
</script>
Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…
Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…
Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…
Technology has emerged a lot in the last decade, and now we have artificial intelligence;…
Managing a database is becoming increasingly complex now due to the vast amount of data…
Overview In this article, we will explore Spring Scheduler how we could use it by…