Running a Spring Boot App with Maven vs an Executable War/Jar 1. Introduction In this tutorial, we’ll explore the differences between starting a Spring Boot web application via the mvn spring-boot:run command and running it after it is compiled into a jar/war package via the java -jar command. Let’s assume… Continue Reading spring-boot-run-maven-vs-executable-jar

Access the Same In-Memory H2 Database in Multiple Spring Boot Applications 1. Overview In this quick tutorial, we’ll demonstrate how to access the same in-memory H2 database from multiple Spring Boot applications. To do this, we’ll create two distinct Spring Boot applications. The first Spring Boot application will start an in-memory H2… Continue Reading spring-boot-access-h2-database-multiple-apps

Spring Boot with Multiple SQL Import Files 1. Overview Spring Boot allows us to import sample data into our database – mainly to prepare data for integration tests. Out of the box, there are two possibilities. We can use import.sql (Hibernate support) or data.sql (Spring JDBC support) files to load… Continue Reading spring-boot-sql-import-files

Setting the MySQL JDBC Timezone Using Spring Boot Configuration 1. Overview Sometimes, when we’re storing dates in MySQL, we realize that the date from the database is different from our system or JVM. Other times, we just need to run our app with another timezone. In this tutorial, we’re going… Continue Reading mysql-jdbc-timezone-spring-boot