Posts

Showing posts from September, 2018

Spring Boot + Maven + RestFul + JPA + Sqlite

1. pom.xml  :- <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.wfd</groupId> <artifactId>springDemo</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>springDemo</name> <description>Demo project for Spring Boot</description> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.4.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <properties> <project.build.sourceEncod

JDBC with Sqlite

Image
                                              JDBC with Sqlite Step1:-  download sqlite JDBC jar with bellow URL. JDBC jar Step2:- create java application and import Jar. select application -> Right click -> Build Path -> Configure Build Path -> Libraries -> click "add external jars"-> select "slite-jdbc-3.23.1.jar" 1. 2. Step3 : write Java-Database connectivity logic import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class SqliteJdbc { public static void main(String[] args) throws ClassNotFoundException, SQLException { // load the sqlite-JDBC driver using the current class loader     Class.forName("org.sqlite.JDBC");     Connection connection = null;     String url="jdbc:sqlite:G:/SW/Development/database/sqlite-tools-win32-x86-3240000/sqlite-tools-win32-x86-3240000/sa