updated
This commit is contained in:
parent
362372209d
commit
7cb5d09edf
7
pom.xml
7
pom.xml
@ -50,10 +50,11 @@
|
|||||||
<artifactId>thymeleaf-layout-dialect</artifactId>
|
<artifactId>thymeleaf-layout-dialect</artifactId>
|
||||||
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
|
<!-- https://mvnrepository.com/artifact/postgresql/postgresql -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>org.postgresql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>postgresql</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
|
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
package com.chantha.springdemo.model;
|
package com.chantha.springdemo.model;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.*;
|
||||||
import javax.persistence.Id;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name="tbfood")
|
@Table(name="tbfood")
|
||||||
public class Food {
|
public class Food {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private long id;
|
private long id;
|
||||||
public Food() {
|
public Food() {
|
||||||
super();
|
super();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
spring.thymeleaf.cache=false
|
spring.thymeleaf.cache=false
|
||||||
spring.jpa.hibernate.ddl-auto=update
|
spring.jpa.hibernate.ddl-auto=update
|
||||||
spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3309/dbfood?createDatabaseIfNotExist=true&allowPublicKeyRetrieval=true&useSSL=false
|
spring.datasource.url=jdbc:postgresql://localhost:5432/dbfoof
|
||||||
spring.datasource.username=root
|
spring.datasource.username=postgres
|
||||||
spring.datasource.password=root
|
spring.datasource.password=postgres
|
||||||
spring.jpa.open-in-view=true
|
spring.jpa.open-in-view=true
|
||||||
|
server.port=8010
|
Loading…
Reference in New Issue
Block a user