Compare commits
2 Commits
8fe1a01699
...
512f4b6408
Author | SHA1 | Date | |
---|---|---|---|
512f4b6408 | |||
7cb5d09edf |
7
pom.xml
7
pom.xml
@ -50,10 +50,11 @@
|
||||
<artifactId>thymeleaf-layout-dialect</artifactId>
|
||||
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
|
||||
<!-- https://mvnrepository.com/artifact/postgresql/postgresql -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
|
||||
|
@ -1,14 +1,13 @@
|
||||
package com.chantha.springdemo.model;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.*;
|
||||
|
||||
@Entity
|
||||
@Table(name="tbfood")
|
||||
public class Food {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private long id;
|
||||
public Food() {
|
||||
super();
|
||||
|
@ -1,7 +1,8 @@
|
||||
spring.thymeleaf.cache=false
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
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.datasource.url=jdbc:postgresql://localhost:5432/dbfoof
|
||||
spring.datasource.username=postgres
|
||||
spring.datasource.password=postgres
|
||||
spring.jpa.open-in-view=true
|
||||
server.servlet.session.tracking-modes=cookie
|
||||
server.port=8010
|
||||
server.servlet.session.tracking-modes=cookie
|
||||
|
Loading…
Reference in New Issue
Block a user