diff --git a/.gitignore b/.gitignore index c2065bc..1acaf36 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,5 @@ out/ ### VS Code ### .vscode/ + +application.properties diff --git a/.metadata/.lock b/.metadata/.lock new file mode 100644 index 0000000..e69de29 diff --git a/.metadata/.log b/.metadata/.log new file mode 100644 index 0000000..3ca1345 --- /dev/null +++ b/.metadata/.log @@ -0,0 +1,38 @@ +!SESSION 2022-02-04 09:54:04.095 ----------------------------------------------- +eclipse.buildId=4.12.1.202110260750 +java.version=17 +java.vendor=Eclipse Adoptium +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR +Framework arguments: -product org.springframework.boot.ide.branding.sts4 +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.springframework.boot.ide.branding.sts4 + +!ENTRY org.eclipse.jface 2 0 2022-02-04 09:54:21.748 +!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation. +!SUBENTRY 1 org.eclipse.jface 2 0 2022-02-04 09:54:21.748 +!MESSAGE A conflict occurred for CTRL+SHIFT+T: +Binding(CTRL+SHIFT+T, + ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type, + Open a type in a Java editor, + Category(org.eclipse.ui.category.navigate,Navigate,null,true), + org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@3494a35e, + ,,true),null), + org.eclipse.ui.defaultAcceleratorConfiguration, + org.eclipse.ui.contexts.window,,,system) +Binding(CTRL+SHIFT+T, + ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace, + , + Category(org.eclipse.lsp4e.category,Language Servers,null,true), + org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@352ce817, + ,,true),null), + org.eclipse.ui.defaultAcceleratorConfiguration, + org.eclipse.ui.contexts.window,,,system) + +!ENTRY org.eclipse.egit.ui 2 0 2022-02-04 09:54:25.256 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\Romain'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.ui 2 2 2022-02-04 09:55:47.121 +!MESSAGE Invalid property category path: org.springframework.ide.eclipse.beans.ui.properties.ProjectPropertyPage (bundle: org.springframework.ide.eclipse.xml.namespaces, propertyPage: org.springframework.ide.eclipse.beans.ui.namespaces.projectPropertyPage) diff --git a/.metadata/.plugins/org.eclipse.buildship.ui/dialog_settings.xml b/.metadata/.plugins/org.eclipse.buildship.ui/dialog_settings.xml new file mode 100644 index 0000000..49e04ca --- /dev/null +++ b/.metadata/.plugins/org.eclipse.buildship.ui/dialog_settings.xml @@ -0,0 +1,6 @@ + +
+
+ +
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location new file mode 100644 index 0000000..7083343 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version new file mode 100644 index 0000000..25cb955 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index new file mode 100644 index 0000000..5897676 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version new file mode 100644 index 0000000..6b2aaa7 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree new file mode 100644 index 0000000..154573b Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources new file mode 100644 index 0000000..8f12cd0 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi new file mode 100644 index 0000000..aae992b --- /dev/null +++ b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -0,0 +1,2422 @@ + + + + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration + + + + + + + + topLevel + shellMaximized + + + + + persp.actionSet:org.eclipse.ui.cheatsheets.actionSet + persp.actionSet:org.eclipse.search.searchActionSet + persp.actionSet:org.eclipse.text.quicksearch.actionSet + persp.actionSet:org.eclipse.ui.edit.text.actionSet.annotationNavigation + persp.actionSet:org.eclipse.ui.edit.text.actionSet.navigation + persp.actionSet:org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo + persp.actionSet:org.eclipse.ui.externaltools.ExternalToolsSet + persp.actionSet:org.eclipse.ui.actionSet.keyBindings + persp.actionSet:org.eclipse.ui.actionSet.openFiles + persp.actionSet:org.springsource.ide.eclipse.commons.launch.actionSet + persp.actionSet:org.eclipse.debug.ui.launchActionSet + persp.actionSet:org.eclipse.jdt.ui.JavaActionSet + persp.actionSet:org.eclipse.jdt.ui.JavaElementCreationActionSet + persp.actionSet:org.eclipse.ui.NavigateActionSet + persp.viewSC:org.eclipse.jdt.ui.PackageExplorer + persp.viewSC:org.eclipse.jdt.ui.TypeHierarchy + persp.viewSC:org.eclipse.jdt.ui.SourceView + persp.viewSC:org.eclipse.jdt.ui.JavadocView + persp.viewSC:org.eclipse.search.ui.views.SearchView + persp.viewSC:org.eclipse.ui.console.ConsoleView + persp.viewSC:org.eclipse.ui.views.ContentOutline + persp.viewSC:org.eclipse.ui.views.ProblemView + persp.viewSC:org.eclipse.ui.views.ResourceNavigator + persp.viewSC:org.eclipse.ui.views.TaskList + persp.viewSC:org.eclipse.ui.views.ProgressView + persp.viewSC:org.eclipse.ui.navigator.ProjectExplorer + persp.viewSC:org.eclipse.ui.texteditor.TemplatesView + persp.viewSC:org.eclipse.pde.runtime.LogView + persp.newWizSC:org.eclipse.jdt.ui.wizards.JavaProjectWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewPackageCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewClassCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewEnumCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewRecordCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard + persp.newWizSC:org.eclipse.ui.wizards.new.folder + persp.newWizSC:org.eclipse.ui.wizards.new.file + persp.newWizSC:org.eclipse.ui.editors.wizards.UntitledTextFileWizard + persp.perspSC:org.eclipse.jdt.ui.JavaBrowsingPerspective + persp.perspSC:org.eclipse.debug.ui.DebugPerspective + persp.showIn:org.eclipse.jdt.ui.PackageExplorer + persp.showIn:org.eclipse.team.ui.GenericHistoryView + persp.showIn:org.eclipse.ui.navigator.ProjectExplorer + persp.actionSet:org.eclipse.debug.ui.breakpointActionSet + persp.actionSet:org.eclipse.jdt.debug.ui.JDTDebugActionSet + persp.newWizSC:org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizard + persp.actionSet:org.eclipse.jdt.junit.JUnitActionSet + persp.showIn:org.eclipse.egit.ui.RepositoriesView + persp.newWizSC:org.springsource.ide.eclipse.commons.gettingstarted.wizard.boot.NewSpringBootWizard + persp.newWizSC:org.springsource.ide.eclipse.gettingstarted.wizards.import.generic.newalias + persp.viewSC:org.eclipse.tm.terminal.view.ui.TerminalsView + persp.showIn:org.eclipse.tm.terminal.view.ui.TerminalsView + persp.viewSC:org.eclipse.ant.ui.views.AntView + + + + + org.eclipse.e4.primaryNavigationStack + active + + View + categoryTag:Java + + + View + categoryTag:Java + + + View + categoryTag:General + + + View + categoryTag:Java + + + + + View + categoryTag:Other + + + + + + View + categoryTag:Git + + + + + + + + org.eclipse.e4.secondaryNavigationStack + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:Ant + + + + + org.eclipse.e4.secondaryDataStack + + View + categoryTag:General + + + View + categoryTag:Java + + + View + categoryTag:Java + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:Terminal + + + + + + + + + View + categoryTag:Help + + + View + categoryTag:General + + + View + categoryTag:Help + + + + + + + View + categoryTag:Help + + + + + View + categoryTag:General + + + + + View + categoryTag:Help + + + + org.eclipse.e4.primaryDataStack + EditorStack + + + + + + + View + categoryTag:Java + active + activeOnClose + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + + View + categoryTag:General + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + + View + categoryTag:General + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:Java + + + + + View + categoryTag:Git + + + + + + View + categoryTag:Other + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Terminal + + + + + View + categoryTag:Ant + + + + toolbarSeparator + + + + Draggable + + + + toolbarSeparator + + + + Draggable + + + toolbarSeparator + + + + Draggable + + + Draggable + + + Draggable + + + toolbarSeparator + + + + Draggable + + + + toolbarSeparator + + + + toolbarSeparator + + + + Draggable + + + stretch + SHOW_RESTORE_MENU + + + Draggable + HIDEABLE + SHOW_RESTORE_MENU + + + + + stretch + + + Draggable + + + Draggable + + + + + + + + + + + + + + + + + + + + + + + + platform:win32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + locale:fr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + platform:win32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Editor + removeOnHide + + + + + View + categoryTag:Ant + + + + + View + categoryTag:Gradle + + + + + View + categoryTag:Gradle + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + NoRestore + + + + + View + categoryTag:Git + + + + + View + categoryTag:Help + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Docker + + + + + View + categoryTag:Docker + + + + + View + categoryTag:Docker + + + + + View + categoryTag:Docker + + + + + View + categoryTag:Maven + + + + + View + categoryTag:Maven + + + + + View + categoryTag:API Tools + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:Version Control (Team) + + + + + View + categoryTag:Version Control (Team) + + + View + categoryTag:Help + + + + + View + categoryTag:Terminal + + + + + View + categoryTag:Other + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:Help + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Server + + + + + View + categoryTag:XML + + + + + View + categoryTag:XML + + + + + View + categoryTag:Other + + + + + View + categoryTag:Other + + + + glue + move_after:PerspectiveSpacer + SHOW_RESTORE_MENU + + + move_after:Spacer Glue + HIDEABLE + SHOW_RESTORE_MENU + + + glue + move_after:SearchField + SHOW_RESTORE_MENU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache new file mode 100644 index 0000000..593f470 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache new file mode 100644 index 0000000..593f470 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt b/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt new file mode 100644 index 0000000..8586397 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt @@ -0,0 +1 @@ +java \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache new file mode 100644 index 0000000..593f470 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat new file mode 100644 index 0000000..3de398e Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml new file mode 100644 index 0000000..a4ee3cb --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml new file mode 100644 index 0000000..9e390f5 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml new file mode 100644 index 0000000..7ef28ed --- /dev/null +++ b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml @@ -0,0 +1,10 @@ + +
+
+ + + + + +
+
diff --git a/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log new file mode 100644 index 0000000..79c1c54 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log @@ -0,0 +1 @@ +2022-02-04 09:54:25,236 [Worker-4: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. diff --git a/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.16.3.20211002-1029.xml b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.16.3.20211002-1029.xml new file mode 100644 index 0000000..139fc6a --- /dev/null +++ b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.16.3.20211002-1029.xml @@ -0,0 +1,42 @@ + + + + %date [%thread] %-5level %logger{35} - %msg%n + + + OFF + + + + + ${org.eclipse.m2e.log.dir}/0.log + + ${org.eclipse.m2e.log.dir}/%i.log + 1 + 10 + + + 100MB + + + %date [%thread] %-5level %logger{35} - %msg%n + + + + + + WARN + + + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties b/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties new file mode 100644 index 0000000..48e6e91 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties @@ -0,0 +1,2 @@ +#Cached timestamps +#Fri Feb 04 09:55:47 CET 2022 diff --git a/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml b/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml new file mode 100644 index 0000000..5ca0b77 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml @@ -0,0 +1,3 @@ + +
+
diff --git a/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml new file mode 100644 index 0000000..41f0d1a --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml @@ -0,0 +1,16 @@ + +
+
+ + + + + + + +
+
+ + +
+
diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml new file mode 100644 index 0000000..5b583c4 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml @@ -0,0 +1,5 @@ + +
+
+
+
diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml new file mode 100644 index 0000000..688ca59 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.metadata/version.ini b/.metadata/version.ini new file mode 100644 index 0000000..a0aa734 --- /dev/null +++ b/.metadata/version.ini @@ -0,0 +1,3 @@ +#Fri Feb 04 09:54:20 CET 2022 +org.eclipse.core.runtime=2 +org.eclipse.platform=4.21.0.v20210906-0500 diff --git a/src/main/java/fr/cardon/simpleat/controller/PreferenceController.java b/src/main/java/fr/cardon/simpleat/controller/PreferenceController.java index 3dbca6b..b77e8a9 100644 --- a/src/main/java/fr/cardon/simpleat/controller/PreferenceController.java +++ b/src/main/java/fr/cardon/simpleat/controller/PreferenceController.java @@ -61,11 +61,11 @@ public class PreferenceController { // return ResponseEntity.status(HttpStatus.OK).body(preferenceRepository.save(personne)); // } // -// @DeleteMapping(value = "/delete-restaurant/{id}") -// public void suppressionPerso(@PathVariable int id){ -// -// preferenceRepository.deleteById(id); -// } + @DeleteMapping("/delete-preference/{idrestau}/{iduser}") + public void deletePreferenceById(@PathVariable int iduser, @PathVariable int idrestau ){ + PreferencePK id = new PreferencePK(personneRepository.getById(iduser) ,restaurantRepository.getById(idrestau)); + preferenceRepository.deleteById(id); + } } diff --git a/src/main/java/fr/cardon/simpleat/controller/TypeRestauController.java b/src/main/java/fr/cardon/simpleat/controller/TypeRestauController.java index cf2a3ce..4aa388e 100644 --- a/src/main/java/fr/cardon/simpleat/controller/TypeRestauController.java +++ b/src/main/java/fr/cardon/simpleat/controller/TypeRestauController.java @@ -2,6 +2,7 @@ package fr.cardon.simpleat.controller; import java.util.Collection; +import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; @@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; +import fr.cardon.simpleat.model.Restaurant; import fr.cardon.simpleat.model.TypeRestau; import fr.cardon.simpleat.repository.TypeRestauRepository; @@ -36,6 +38,11 @@ public class TypeRestauController { return typeRestauRepository.findById(id); } + @GetMapping("/restaurantbytype/{id}") + public List findRestauByType(@PathVariable int id){ + return findTypetById(id).getRestaurants(); + } + @PostMapping("/add-type") public ResponseEntity ajoutType(@RequestBody TypeRestau type){ return ResponseEntity.status(HttpStatus.OK).body(typeRestauRepository.save(type)); diff --git a/src/main/java/fr/cardon/simpleat/model/Personne.java b/src/main/java/fr/cardon/simpleat/model/Personne.java index 9b9b7bf..68c58a8 100644 --- a/src/main/java/fr/cardon/simpleat/model/Personne.java +++ b/src/main/java/fr/cardon/simpleat/model/Personne.java @@ -4,6 +4,7 @@ package fr.cardon.simpleat.model; import java.util.ArrayList; import java.util.Collection; +import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; @@ -12,7 +13,9 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; +import javax.persistence.OneToMany; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @Entity @@ -24,6 +27,7 @@ public class Personne { private String email; private String password; private Collection roles = new ArrayList(); + private Collection preference = new ArrayList(); public Personne() { @@ -106,5 +110,17 @@ public class Personne { public void setRoles(Collection roles) { this.roles = roles; } + + + @OneToMany(mappedBy = "preferencePK.personne", cascade = CascadeType.REMOVE) + @JsonIgnore + public Collection getPreference() { + return preference; + } + + + public void setPreference(Collection preference) { + this.preference = preference; + } } diff --git a/src/main/java/fr/cardon/simpleat/model/PreferencePK.java b/src/main/java/fr/cardon/simpleat/model/PreferencePK.java index 8e17df1..ed364ae 100644 --- a/src/main/java/fr/cardon/simpleat/model/PreferencePK.java +++ b/src/main/java/fr/cardon/simpleat/model/PreferencePK.java @@ -8,6 +8,7 @@ import javax.persistence.Embeddable; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; +import javax.persistence.PrimaryKeyJoinColumn; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -37,7 +38,7 @@ public class PreferencePK implements Serializable { @ManyToOne - @JoinColumn(name="id_personne", referencedColumnName ="id_personne" ) + @PrimaryKeyJoinColumn(name="id_personne", referencedColumnName ="id_personne" ) @JsonIgnoreProperties({"hibernateLazyInitializer", "handler"}) public Personne getPersonne() { return personne; @@ -50,7 +51,7 @@ public class PreferencePK implements Serializable { @ManyToOne // TODO mappedBy preferences dans restaurant - @JoinColumn(name="id_restau",referencedColumnName ="id_restau" ) + @PrimaryKeyJoinColumn(name="id_restau",referencedColumnName ="id_restau" ) @JsonIgnoreProperties({"hibernateLazyInitializer", "handler"}) public Restaurant getRestau() { return restau; diff --git a/src/main/java/fr/cardon/simpleat/model/Restaurant.java b/src/main/java/fr/cardon/simpleat/model/Restaurant.java index 65e3ceb..a85ca3f 100644 --- a/src/main/java/fr/cardon/simpleat/model/Restaurant.java +++ b/src/main/java/fr/cardon/simpleat/model/Restaurant.java @@ -12,7 +12,10 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; +import javax.persistence.OneToMany; +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -25,22 +28,21 @@ public class Restaurant { private String telephone; private boolean aEmporter; private boolean surPlace; - private double prix; + private int prix; private boolean accesPMR; private String latitude; private String longitude; private String website; private Collection typerestaus = new ArrayList(); - + private Collection preference = new ArrayList(); //TODO @OneToMany relier avec une collec de preferences public Restaurant() { super(); // TODO Auto-generated constructor stub } - - public Restaurant(String nom, String adresse, String telephone, boolean aEmporter, boolean surPlace, double prix, + public Restaurant(String nom, String adresse, String telephone, boolean aEmporter, boolean surPlace, int prix, boolean accesPMR, String latitude, String longitude, String website, Collection typerestaus) { super(); this.nom = nom; @@ -103,11 +105,11 @@ public class Restaurant { this.surPlace = surPlace; } @Column(nullable = true) - public double getPrix() { + public int getPrix() { return prix; } - public void setPrix(double prixMin) { - this.prix = prixMin; + public void setPrix(int prix) { + this.prix = prix; } @Column(nullable = true) public boolean isAccesPMR() { @@ -142,7 +144,7 @@ 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")) - @JsonIgnoreProperties("typerestaus") + @JsonBackReference("typerestaus") public Collection getTyperestaus() { return typerestaus; } @@ -150,5 +152,17 @@ public class Restaurant { public void setTyperestaus(Collection typerestaus) { this.typerestaus = typerestaus; } + + + @OneToMany(mappedBy = "preferencePK.restau", cascade = CascadeType.REMOVE) + @JsonIgnore + public Collection getPreference() { + return preference; + } + + + public void setPreference(Collection preference) { + this.preference = preference; + } } diff --git a/src/main/resources/Postman b/src/main/resources/Postman new file mode 100644 index 0000000..a222d5a --- /dev/null +++ b/src/main/resources/Postman @@ -0,0 +1,557 @@ +{ + "info": { + "_postman_id": "5edbac98-7561-4ccc-b517-87c01aef2a41", + "name": "Simpleat", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "Personne", + "item": [ + { + "name": "Accueil", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [] + }, + "url": { + "raw": "localhost:8080/", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "" + ] + } + }, + "response": [] + }, + { + "name": "affichPersonnes", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "localhost:8080/users", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "users" + ] + } + }, + "response": [] + }, + { + "name": "AffichUnePersonne", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "localhost:8080/user/2", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "user", + "2" + ] + } + }, + "response": [] + }, + { + "name": "AjoutPersonne", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"nom\": \"nouvel\",\r\n \"prenom\": \"ajout\",\r\n \"email\": \"role@ajout.fr\",\r\n \"password\": \"root\",\r\n \"roles\": [\r\n {\r\n \"id\": 2\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:8080/add-user", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "add-user" + ] + } + }, + "response": [] + }, + { + "name": "UpdatePersonne", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"id\": 2,\r\n \"nom\": \"salut\",\r\n \"prenom\": \"enleve\",\r\n \"email\": \"nouvel@ajout.fr\",\r\n \"password\": \"root\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:8080/update-user/2", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "update-user", + "2" + ] + } + }, + "response": [] + }, + { + "name": "DeletePersonne", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "localhost:8080/delete-user/1", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "delete-user", + "1" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Preference", + "item": [ + { + "name": "AffichPreference", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "localhost:8080/preference/1/3", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "preference", + "1", + "3" + ] + } + }, + "response": [] + }, + { + "name": "AffichPreferences", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "localhost:8080/preferences", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "preferences" + ] + } + }, + "response": [] + }, + { + "name": "Ajout preferences", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"personne\": {\r\n \"id\": 1\r\n },\r\n \"restau\": {\r\n \"id\": 5\r\n },\r\n \"note\": 5,\r\n \"favoris\": true\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "localhost:8080/add-preference", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "add-preference" + ] + } + }, + "response": [] + }, + { + "name": "Delete preferences", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "localhost:8080/delete-preference/:idrestau/:iduser", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "delete-preference", + ":idrestau", + ":iduser" + ], + "variable": [ + { + "key": "idrestau", + "value": "3" + }, + { + "key": "iduser", + "value": "1" + } + ] + } + }, + "response": [] + }, + { + "name": "Del prefByRestau[OUT]", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "localhost:8080/delete-pref-byrestau/3", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "delete-pref-byrestau", + "3" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Restaurant", + "item": [ + { + "name": "AffichRestaurants", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "localhost:8080/restaurants", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "restaurants" + ] + } + }, + "response": [] + }, + { + "name": "AfficheUnRestaurant", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "localhost:8080/restaurant/2", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "restaurant", + "2" + ] + } + }, + "response": [] + }, + { + "name": "AfficheRestoParType", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "localhost:8080/restaurantbytype/1", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "restaurantbytype", + "1" + ] + } + }, + "response": [] + }, + { + "name": "AjoutRestaurant", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": " {\r\n \"nom\": \"gevaudan\",\r\n \"adresse\": \"Montreil\",\r\n \"latitude\": \"31.45571\",\r\n \"longitude\": \"34.43719\",\r\n \"typerestaus\": [\r\n {\r\n \"id\": 3\r\n },\r\n {\r\n \"id\": 4\r\n }\r\n ]\r\n }", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:8080/add-restaurant", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "add-restaurant" + ] + } + }, + "response": [] + }, + { + "name": "UpdateRestaurant", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": " {\r\n \"id\": 2,\r\n \"nom\": \"suepr\",\r\n \"adresse\": \"93100 Montreuil\",\r\n \"telephone\": \"6809964349\",\r\n \"aEmporter\": false,\r\n \"surPlace\": true,\r\n \"prixMin\": 1.0,\r\n \"prixMax\": 17.0,\r\n \"accesPMR\": false,\r\n \"latitude\": \"31.45571\",\r\n \"longitude\": \"34.43719\",\r\n \"typerestaus\": []\r\n }", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:8080/update-restaurant/2", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "update-restaurant", + "2" + ] + } + }, + "response": [] + }, + { + "name": "DeleteRestaurant", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "localhost:8080/delete-restaurant/4", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "delete-restaurant", + "4" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Type", + "item": [ + { + "name": "AffichTypes", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "localhost:8080/types", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "types" + ] + } + }, + "response": [] + }, + { + "name": "Affich1Type", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "localhost:8080/type/2", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "type", + "2" + ] + } + }, + "response": [] + }, + { + "name": "UpdateType", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"id\": 2,\r\n \"libelle\": \"creperie\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "localhost:8080/update-type/2", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "update-type", + "2" + ] + } + }, + "response": [] + }, + { + "name": "AddType", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"libelle\": \"coucou\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "localhost:8080/add-type", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "add-type" + ] + } + }, + "response": [] + }, + { + "name": "DeleteType", + "request": { + "method": "DELETE", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "localhost:8080/delete-type/:id", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "delete-type", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "2" + } + ] + } + }, + "response": [] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 7b8d95f..ef785ee 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -12,11 +12,13 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # =============================== # JPA / HIBERNATE # =============================== -##spring.jpa.show-sql=true -spring.jpa.hibernate.ddl-auto=update -##spring.jpa.hibernate.ddl-auto=create-drop + +spring.jpa.show-sql=true +##spring.jpa.hibernate.ddl-auto=update +spring.jpa.hibernate.ddl-auto=create-drop spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect # =============================== # Permet d'exécuter le data.sql # =============================== -##spring.sql.init.mode=always +spring.sql.init.mode=always +spring.jpa.defer-datasource-initialization=true \ No newline at end of file diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index b075246..669d7b9 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -13,26 +13,26 @@ insert into personne (nom, prenom, email, password) values ('Crick', 'Andris', ' insert into role (id_role, intitule) values (1, 'Admin'); insert into role (id_role, intitule) values (2, 'User'); -insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix_min, prix_max, accespmr, latitude, longitude) values ('L Perrigo Company', '301 Thierer Trail', '3092096786', false, true, 10, 16, false, '2.1961772', '22.4708685'); -insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix_min, prix_max, accespmr, latitude, longitude) values ('Sanofi Pasteur Inc.', '9 Barnett Terrace', '6809964349', false, true, 1, 17, false, '31.45571', '34.43719'); -insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix_min, prix_max, accespmr, latitude, longitude) values ('REMEDYREPACK INC.', '3 West Park', '4565542193', true, false, 2, 20, true, '49.817777', '19.785536'); -insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix_min, prix_max, accespmr, latitude, longitude) values ('Physicians Total Care, Inc.', '462 Mosinee Lane', '8521719889', false, false, 1, 22, true, '-13.5', '48.86667'); -insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix_min, prix_max, accespmr, latitude, longitude) values ('Triweld Industries, Inc.', '2482 Corscot Way', '7513208452', false, true, 5, 13, true, '34.326903', '108.117456'); +insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix, accespmr, latitude, longitude) values ('L Perrigo Company', '301 Thierer Trail', '3092096786', false, true, 1, false, '2.1961772', '22.4708685'); +insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix, accespmr, latitude, longitude) values ('Sanofi Pasteur Inc.', '9 Barnett Terrace', '6809964349', false, true, 2, false, '31.45571', '34.43719'); +insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix, accespmr, latitude, longitude) values ('REMEDYREPACK INC.', '3 West Park', '4565542193', true, false, 3, true, '49.817777', '19.785536'); +insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix, accespmr, latitude, longitude) values ('Physicians Total Care, Inc.', '462 Mosinee Lane', '8521719889', false, false, 4, true, '-13.5', '48.86667'); +insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix, accespmr, latitude, longitude) values ('Triweld Industries, Inc.', '2482 Corscot Way', '7513208452', false, true, 2, true, '34.326903', '108.117456'); -insert into preference (id_restau, id_personne, note, favori) values (2, 9, 1, false); -insert into preference (id_restau, id_personne, note, favori) values (3, 1, 5, false); -insert into preference (id_restau, id_personne, note, favori) values (1, 9, 3, true); -insert into preference (id_restau, id_personne, note, favori) values (4, 6, 2, false); -insert into preference (id_restau, id_personne, note, favori) values (5, 5, 5, false); -insert into preference (id_restau, id_personne, note, favori) values (1, 10, 1, false); -insert into preference (id_restau, id_personne, note, favori) values (5, 3, 5, false); -insert into preference (id_restau, id_personne, note, favori) values (1, 7, 1, true); -insert into preference (id_restau, id_personne, note, favori) values (4, 2, 1, false); -insert into preference (id_restau, id_personne, note, favori) values (1, 3, 5, false); -insert into preference (id_restau, id_personne, note, favori) values (3, 10, 4, false); -insert into preference (id_restau, id_personne, note, favori) values (3, 3, 4, true); -insert into preference (id_restau, id_personne, note, favori) values (2, 3, 3, false); -insert into preference (id_restau, id_personne, note, favori) values (2, 8, 3, false); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (2, 9, 1, false); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (3, 1, 5, false); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (1, 9, 3, true); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (4, 6, 2, false); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (5, 5, 5, false); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (1, 10, 1, false); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (5, 3, 5, false); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (1, 7, 1, true); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (4, 2, 1, false); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (1, 3, 5, false); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (3, 10, 4, false); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (3, 3, 4, true); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (2, 3, 3, false); +insert into preference (restau_id_restau, personne_id_personne, note, favori) values (2, 8, 3, false); insert into type (id_type, libelle) values (1, 'Kebab'); insert into type (id_type, libelle) values (2, 'Supermarché');