JPA for sqlite3 works

version2
Tim Holloway 2 years ago
parent 222904056d
commit 84ba8acb2b
  1. 123
      pom.xml
  2. 2
      src/main/java/com/codenotfound/SpringPrimeFacesApplication.java
  3. 11
      src/main/resources/data.sql

@ -1,68 +1,75 @@
<?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"
<modelVersion>4.0.0</modelVersion> 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.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>
<name>jsf-primefaces-datatable</name> <name>jsf-primefaces-datatable</name>
<description>JSF PrimeFaces DataTable Example</description> <description>JSF PrimeFaces DataTable Example</description>
<url>https://codenotfound.com/jsf-primefaces-datatable-example.html</url> <url>https://codenotfound.com/jsf-primefaces-datatable-example.html</url>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.RELEASE</version> <version>2.1.0.RELEASE</version>
<relativePath /> <!-- lookup parent from repository --> <relativePath /> <!-- lookup parent from repository -->
</parent> </parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>11</java.version>
<joinfaces.version>3.3.0-rc2</joinfaces.version>
</properties>
<properties> <dependencyManagement>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <dependencies>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <dependency>
<java.version>1.8</java.version> <groupId>org.joinfaces</groupId>
<joinfaces.version>3.3.0-rc2</joinfaces.version> <artifactId>joinfaces-dependencies</artifactId>
</properties> <version>${joinfaces.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.joinfaces</groupId> <groupId>org.joinfaces</groupId>
<artifactId>joinfaces-dependencies</artifactId> <artifactId>primefaces-spring-boot-starter</artifactId>
<version>${joinfaces.version}</version> </dependency>
<type>pom</type> <dependency>
<scope>import</scope> <groupId>javax.enterprise</groupId>
</dependency> <artifactId>cdi-api</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.github.gwenn</groupId>
<artifactId>sqlite-dialect</artifactId>
<version>0.1.2</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement>
<dependencies> <build>
<dependency> <plugins>
<groupId>org.joinfaces</groupId> <plugin>
<artifactId>primefaces-spring-boot-starter</artifactId> <groupId>org.springframework.boot</groupId>
</dependency> <artifactId>spring-boot-maven-plugin</artifactId>
<dependency> </plugin>
<groupId>javax.enterprise</groupId> </plugins>
<artifactId>cdi-api</artifactId> </build>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

@ -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) {

@ -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');
Loading…
Cancel
Save