Connecting to a Specific Schema in JDBC

This commit is contained in:
Mladen Savic
2021-08-31 20:44:43 +02:00
parent f49b1f9235
commit f30118469c
5 changed files with 154 additions and 0 deletions
@@ -0,0 +1,30 @@
package com.baeldung.jpa.postgresql_schema;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "product", schema = "store")
public class Product {
@Id
private int id;
private String name;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}