Category Archives: Spring Boot

IntelliJ IDEA – Create Spring Boot Application

This is how to create spring boot application from IntelliJ IDEA. 1. On the top IDE menu choose “File” -> “New” -> “Project…” 2. Setup JDK 3. Fill project details like group artifact type of build tools (maven or gradle) programming language (java, kotlin, groovy) packaging (jar or war) file application name application description package (com.example.module-name) 4. Choose… Read More »

How to Use Spring JdbcTemplate

This is how to use spring JdbcTemplate in spring boot application. In this example i’m using : Spring boot 2.0.2.RELEASE Maven 3.5.3 for build tools Java 1.8 How to Use Spring JdbcTemplate First import spring jdbc library: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> Second, create new java class for JdbcTemplate configuration like this: @Component public class JdbcConfig { @Value(“${spring.datasource.driverClassName}”) String… Read More »