Compare commits
No commits in common. "512f4b6408eebf7be16a292af7a5e9505f0bc6cb" and "8fe1a01699af0362d94eae703182d83f6f540ec4" have entirely different histories.
512f4b6408
...
8fe1a01699
7
pom.xml
7
pom.xml
@ -50,11 +50,10 @@
|
|||||||
<artifactId>thymeleaf-layout-dialect</artifactId>
|
<artifactId>thymeleaf-layout-dialect</artifactId>
|
||||||
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/postgresql/postgresql -->
|
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.postgresql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>postgresql</artifactId>
|
<artifactId>mysql-connector-java</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,13 +1,14 @@
|
|||||||
package com.chantha.springdemo.model;
|
package com.chantha.springdemo.model;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.Entity;
|
||||||
|
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,8 +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:postgresql://localhost:5432/dbfoof
|
spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3309/dbfood?createDatabaseIfNotExist=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||||
spring.datasource.username=postgres
|
spring.datasource.username=root
|
||||||
spring.datasource.password=postgres
|
spring.datasource.password=root
|
||||||
spring.jpa.open-in-view=true
|
spring.jpa.open-in-view=true
|
||||||
server.port=8010
|
server.servlet.session.tracking-modes=cookie
|
||||||
server.servlet.session.tracking-modes=cookie
|
|
Loading…
Reference in New Issue
Block a user