JPA for sqlite3 works

This commit is contained in:
Tim Holloway 2021-12-28 08:07:36 -05:00
parent 222904056d
commit 84ba8acb2b
3 changed files with 71 additions and 73 deletions

19
pom.xml
View File

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?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" <project xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 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> <modelVersion>4.0.0</modelVersion>
<groupId>com.codenotfound</groupId> <groupId>com.mousetech.gourmet</groupId>
<artifactId>jsf-primefaces-datatable</artifactId> <artifactId>jsf-primefaces-datatable</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
@ -22,7 +24,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version> <java.version>11</java.version>
<joinfaces.version>3.3.0-rc2</joinfaces.version> <joinfaces.version>3.3.0-rc2</joinfaces.version>
</properties> </properties>
@ -52,8 +54,13 @@
<artifactId>spring-boot-starter-data-jpa</artifactId> <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.h2database</groupId> <groupId>org.xerial</groupId>
<artifactId>h2</artifactId> <artifactId>sqlite-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.github.gwenn</groupId>
<artifactId>sqlite-dialect</artifactId>
<version>0.1.2</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -2,8 +2,10 @@ package com.codenotfound;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
@SpringBootApplication @SpringBootApplication
@EntityScan(value = {"com.mousetech.gourmetj.persistence.model", "com.codenotfound.primefaces"})
public class SpringPrimeFacesApplication { public class SpringPrimeFacesApplication {
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -1,11 +0,0 @@
INSERT INTO car (brand, year, color) VALUES
('Audi', 1992, 'Red'),
('Fiat', 2001, 'Red'),
('Mercedes', 1991, 'Brown'),
('Fiat', 1962, 'Black'),
('Renault', 1997, 'Brown'),
('Renault', 1967, 'Maroon'),
('Renault', 1986, 'Yellow'),
('BMW', 1970, 'Maroon'),
('Fiat', 1990, 'Silver'),
('Renault', 1972, 'Black');