From 73a352973ee0f555a7b15ef6fc232acf207751e1 Mon Sep 17 00:00:00 2001 From: Thomas Cardon Date: Mon, 14 Feb 2022 23:28:20 +0100 Subject: [PATCH 01/12] acces aux types par restau --- src/main/java/fr/cardon/simpleat/model/Restaurant.java | 1 - src/main/java/fr/cardon/simpleat/model/TypeRestau.java | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/cardon/simpleat/model/Restaurant.java b/src/main/java/fr/cardon/simpleat/model/Restaurant.java index 0a50a79..7f94abe 100644 --- a/src/main/java/fr/cardon/simpleat/model/Restaurant.java +++ b/src/main/java/fr/cardon/simpleat/model/Restaurant.java @@ -144,7 +144,6 @@ public class Restaurant { @JoinTable(name="type_restau", joinColumns = @JoinColumn(name = "id_restau"/*classe en cours*/,referencedColumnName = "id_restau" /*classe reliée*/) , inverseJoinColumns = @JoinColumn(name = "id_type",referencedColumnName = "id_type")) - @JsonBackReference("typerestaus") public Collection getTyperestaus() { return typerestaus; } diff --git a/src/main/java/fr/cardon/simpleat/model/TypeRestau.java b/src/main/java/fr/cardon/simpleat/model/TypeRestau.java index 01f6d51..0d85160 100644 --- a/src/main/java/fr/cardon/simpleat/model/TypeRestau.java +++ b/src/main/java/fr/cardon/simpleat/model/TypeRestau.java @@ -10,6 +10,7 @@ import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.Table; +import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -49,7 +50,7 @@ public class TypeRestau { } @ManyToMany(mappedBy="typerestaus") - @JsonIgnoreProperties("typerestaus") + @JsonBackReference("restaurants") public List getRestaurants() { return restaurants; } From 49694f4bc01de4ea52dd7fcb56ef7ba406a1ecf7 Mon Sep 17 00:00:00 2001 From: Thomas <37211499+thomascardon35@users.noreply.github.com> Date: Tue, 15 Feb 2022 00:03:51 +0100 Subject: [PATCH 02/12] Update build.gradle --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 92a2fa8..1474fba 100644 --- a/build.gradle +++ b/build.gradle @@ -17,6 +17,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' runtimeOnly 'mysql:mysql-connector-java' testImplementation 'org.springframework.boot:spring-boot-starter-test' + developmentOnly 'org.springframework.boot:spring-boot-devtools' } test { From fc916ca0b659c2152e68eba03285f36c3efb0714 Mon Sep 17 00:00:00 2001 From: Vincent Ramiere Date: Wed, 16 Feb 2022 15:17:34 +0100 Subject: [PATCH 03/12] Modif app.properties_vincent --- src/main/resources/application.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 875e116..1697a55 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,9 +1,9 @@ # =============================== # base de données MySQL # =============================== -spring.datasource.url=jdbc:mysql://localhost:3308/simpleat?useSSL=false&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=CET -spring.datasource.username=root -spring.datasource.password=root +spring.datasource.url=jdbc:mysql://localhost:3306/simpleat?useSSL=false&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=CET +spring.datasource.username=simplon +spring.datasource.password=bbLouis1&Noe2 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # log #logging.level.root=INFO From 4899fa8237021193b859dcad311ed8523354f8dc Mon Sep 17 00:00:00 2001 From: Thomas <37211499+thomascardon35@users.noreply.github.com> Date: Wed, 16 Feb 2022 15:25:10 +0100 Subject: [PATCH 04/12] Update .gitignore application.properties --- .gitignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1acaf36..4369206 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ build/ !**/src/main/**/build/ !**/src/test/**/build/ +src/main/resources/application.properties + + ### STS ### .apt_generated .classpath @@ -35,5 +38,3 @@ out/ ### VS Code ### .vscode/ - -application.properties From 3f3e03b4b1bb2b941666bb63adad147ccb847a35 Mon Sep 17 00:00:00 2001 From: Thomas Cardon Date: Wed, 16 Feb 2022 15:30:00 +0100 Subject: [PATCH 05/12] test gitignore properties --- src/main/resources/application.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 1697a55..875e116 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,9 +1,9 @@ # =============================== # base de données MySQL # =============================== -spring.datasource.url=jdbc:mysql://localhost:3306/simpleat?useSSL=false&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=CET -spring.datasource.username=simplon -spring.datasource.password=bbLouis1&Noe2 +spring.datasource.url=jdbc:mysql://localhost:3308/simpleat?useSSL=false&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=CET +spring.datasource.username=root +spring.datasource.password=root spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # log #logging.level.root=INFO From b6fef494278f1f34ba4f7b761db39611ba5b6413 Mon Sep 17 00:00:00 2001 From: Thomas <37211499+thomascardon35@users.noreply.github.com> Date: Wed, 16 Feb 2022 15:33:53 +0100 Subject: [PATCH 06/12] Update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4369206..da015e2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ build/ !**/src/main/**/build/ !**/src/test/**/build/ -src/main/resources/application.properties +/src/main/resources/application.properties ### STS ### From 2e4055c08437234cf5dbf51ce651818ea1aef8fc Mon Sep 17 00:00:00 2001 From: Thomas Cardon Date: Wed, 16 Feb 2022 15:35:24 +0100 Subject: [PATCH 07/12] test --- src/main/resources/application.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 875e116..f0196d3 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -20,4 +20,5 @@ spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDial # Permet d'exécuter le data.sql # =============================== spring.sql.init.mode=always -spring.jpa.defer-datasource-initialization=true \ No newline at end of file +spring.jpa.defer-datasource-initialization=true +#test \ No newline at end of file From 1d92a6986a351ff3ec0607adf760a216b8ca89ee Mon Sep 17 00:00:00 2001 From: Thomas <37211499+thomascardon35@users.noreply.github.com> Date: Wed, 16 Feb 2022 15:48:00 +0100 Subject: [PATCH 08/12] Update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index da015e2..837418a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ build/ !**/src/main/**/build/ !**/src/test/**/build/ -/src/main/resources/application.properties +*.properties ### STS ### From 098c21df05f7731feb8f2a3cf7b524a62ef3deaf Mon Sep 17 00:00:00 2001 From: Thomas Cardon Date: Wed, 16 Feb 2022 15:51:22 +0100 Subject: [PATCH 09/12] test --- src/main/resources/application.properties | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f0196d3..875e116 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -20,5 +20,4 @@ spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDial # Permet d'exécuter le data.sql # =============================== spring.sql.init.mode=always -spring.jpa.defer-datasource-initialization=true -#test \ No newline at end of file +spring.jpa.defer-datasource-initialization=true \ No newline at end of file From 02d767e40e902e5656a4d43dba3f123a669122c6 Mon Sep 17 00:00:00 2001 From: Thomas <37211499+thomascardon35@users.noreply.github.com> Date: Wed, 16 Feb 2022 15:52:44 +0100 Subject: [PATCH 10/12] Update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 837418a..7abadce 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ build/ !**/src/main/**/build/ !**/src/test/**/build/ -*.properties +application.properties ### STS ### From 18e4d8c76cc7aa31d6dd269f16143aab6a3db0c2 Mon Sep 17 00:00:00 2001 From: Thomas Cardon Date: Wed, 16 Feb 2022 16:03:39 +0100 Subject: [PATCH 11/12] test --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 837418a..69bd3ff 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ out/ ### VS Code ### .vscode/ +application.properties From ac43443308d13422277cf2d1881aea1070d3a590 Mon Sep 17 00:00:00 2001 From: Thomas <37211499+thomascardon35@users.noreply.github.com> Date: Wed, 16 Feb 2022 16:46:00 +0100 Subject: [PATCH 12/12] Update .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 337d2bf..7abadce 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,3 @@ out/ ### VS Code ### .vscode/ -application.properties