Compare commits

..

No commits in common. "512f4b6408eebf7be16a292af7a5e9505f0bc6cb" and "8fe1a01699af0362d94eae703182d83f6f540ec4" have entirely different histories.

3 changed files with 10 additions and 11 deletions

View File

@ -50,11 +50,10 @@
<artifactId>thymeleaf-layout-dialect</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/postgresql/postgresql -->
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->

View File

@ -1,13 +1,14 @@
package com.chantha.springdemo.model;
import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="tbfood")
public class Food {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
public Food() {
super();

View File

@ -1,8 +1,7 @@
spring.thymeleaf.cache=false
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:postgresql://localhost:5432/dbfoof
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3309/dbfood?createDatabaseIfNotExist=true&allowPublicKeyRetrieval=true&useSSL=false
spring.datasource.username=root
spring.datasource.password=root
spring.jpa.open-in-view=true
server.port=8010
server.servlet.session.tracking-modes=cookie
server.servlet.session.tracking-modes=cookie