aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-03-16 18:20:07 +0000
committerterminaldweller <thabogre@gmail.com>2022-03-16 18:20:07 +0000
commit21b33c3e86aa2bdba726bc527f5ba306812cf68e (patch)
tree9ace98da24395103bc3b8b7bad6409b818a8b089 /src
parentwip (diff)
downloadmdrtl-21b33c3e86aa2bdba726bc527f5ba306812cf68e.tar.gz
mdrtl-21b33c3e86aa2bdba726bc527f5ba306812cf68e.zip
daily commit.wip
Diffstat (limited to '')
-rw-r--r--src/main/java/com/terminaldweller/doc/Doc.java13
-rw-r--r--src/main/resources/application.properties6
2 files changed, 16 insertions, 3 deletions
diff --git a/src/main/java/com/terminaldweller/doc/Doc.java b/src/main/java/com/terminaldweller/doc/Doc.java
index c746692..1ec9dca 100644
--- a/src/main/java/com/terminaldweller/doc/Doc.java
+++ b/src/main/java/com/terminaldweller/doc/Doc.java
@@ -1,8 +1,21 @@
package com.terminaldweller.doc;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
/** The document class. */
+@Entity
+@Table
public class Doc {
+ @Id
+ @SequenceGenerator(name = "doc_sequence", sequenceName = "doc_sequence", allocationSize = 1)
+ @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "doc_sequence")
private Long id;
+
private String name;
private long lastModified;
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 547f233..e0578c9 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,6 +1,6 @@
-spring.datasource.url=jdbc:postgresql://postgres:5432
-spring.datasource.username=
-spring.datasource.password=
+spring.datasource.url=jdbc:postgresql://postgres:5432/
+spring.datasource.username=spring
+spring.datasource.password=qwerqty
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect