recup branche dev
This commit is contained in:
commit
118a1d202a
2
.gitignore
vendored
2
.gitignore
vendored
@ -35,3 +35,5 @@ out/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
application.properties
|
||||
|
0
.metadata/.lock
Normal file
0
.metadata/.lock
Normal file
38
.metadata/.log
Normal file
38
.metadata/.log
Normal file
@ -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)
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<section name="Workbench">
|
||||
<section name="org.eclipse.buildship.ui.wizard.project.import">
|
||||
<item key="project_location" value="C:\Users\Romain\Desktop\projet-fil-rouge\simpleat-back"/>
|
||||
</section>
|
||||
</section>
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
|
BIN
.metadata/.plugins/org.eclipse.core.resources/.root/1.tree
Normal file
BIN
.metadata/.plugins/org.eclipse.core.resources/.root/1.tree
Normal file
Binary file not shown.
Binary file not shown.
2422
.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
Normal file
2422
.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
BIN
.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache
Normal file
BIN
.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
java
|
BIN
.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache
Normal file
BIN
.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache
Normal file
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<typeInfoHistroy/>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<qualifiedTypeNameHistroy/>
|
10
.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
Normal file
10
.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<section name="Workbench">
|
||||
<section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
|
||||
<item key="group_libraries" value="true"/>
|
||||
<item key="layout" value="2"/>
|
||||
<item key="rootMode" value="1"/>
|
||||
<item key="linkWithEditor" value="false"/>
|
||||
<item key="memento" value="<?xml version="1.0" encoding="UTF-8"?>
<packageExplorer group_libraries="1" layout="2" linkWithEditor="0" rootMode="1" workingSetName="">
<customFilters userDefinedPatternsEnabled="false">
<xmlDefinedFilters>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.StaticsFilter" isEnabled="false"/>
<child filterId="org.eclipse.buildship.ui.packageexplorer.filter.gradle.buildfolder" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter" isEnabled="true"/>
<child filterId="org.eclipse.m2e.MavenModuleFilter" isEnabled="false"/>
<child filterId="org.eclipse.buildship.ui.packageexplorer.filter.gradle.subProject" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter" isEnabled="true"/>
<child filterId="org.eclipse.pde.ui.BinaryProjectFilter1" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter" isEnabled="false"/>
<child filterId="org.eclipse.pde.ui.ExternalPluginLibrariesFilter1" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.FieldsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.DeprecatedMembersFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.LibraryFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter" isEnabled="false"/>
</xmlDefinedFilters>
</customFilters>
</packageExplorer>"/>
|
||||
</section>
|
||||
</section>
|
@ -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.
|
@ -0,0 +1,42 @@
|
||||
<configuration scan="true">
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>OFF</level> <!-- change to DEBUG to mimic '-consolelog' behaviour -->
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<File>${org.eclipse.m2e.log.dir}/0.log</File>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<FileNamePattern>${org.eclipse.m2e.log.dir}/%i.log</FileNamePattern>
|
||||
<MinIndex>1</MinIndex>
|
||||
<MaxIndex>10</MaxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<MaxFileSize>100MB</MaxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="EclipseLog" class="org.eclipse.m2e.logback.appender.EclipseLogAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>WARN</level>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="MavenConsoleLog" class="org.eclipse.m2e.logback.appender.MavenConsoleAppender">
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="FILE" />
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="EclipseLog" />
|
||||
<appender-ref ref="MavenConsoleLog" />
|
||||
</root>
|
||||
<logger name="net.schmizz" level="OFF" />
|
||||
</configuration>
|
@ -0,0 +1,2 @@
|
||||
#Cached timestamps
|
||||
#Fri Feb 04 09:55:47 CET 2022
|
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<section name="Workbench">
|
||||
</section>
|
16
.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
Normal file
16
.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<section name="Workbench">
|
||||
<section name="SmartImportWizard">
|
||||
<item key="SmartImportRootWizardPage.STORE_HIDE_ALREADY_OPEN" value="false"/>
|
||||
<item key="SmartImportRootWizardPage.STORE_CLOSE_IMPORTED" value="false"/>
|
||||
<item key="SmartImportRootWizardPage.STORE_NESTED_PROJECTS" value="true"/>
|
||||
<item key="SmartImportRootWizardPage.STORE_CONFIGURE_NATURES" value="true"/>
|
||||
<list key="org.eclipse.ui.internal.wizards.datatransfer.SmartImportRootWizardPage.knownSources">
|
||||
<item value="C:\Users\Romain\Desktop\projet-fil-rouge\simpleat-back"/>
|
||||
</list>
|
||||
</section>
|
||||
<section name="ChooseWorkspaceDialogSettings">
|
||||
<item key="DIALOG_X_ORIGIN" value="652"/>
|
||||
<item key="DIALOG_Y_ORIGIN" value="341"/>
|
||||
</section>
|
||||
</section>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<section name="Workbench">
|
||||
<section name="ImportExportAction">
|
||||
</section>
|
||||
</section>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<workingSetManager>
|
||||
<workingSet editPageId="org.eclipse.jdt.internal.ui.DynamicSourcesWorkingSet" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1643964862535_0" label="Java Main Sources" name="Java Main Sources"/>
|
||||
<workingSet editPageId="org.eclipse.jdt.internal.ui.DynamicSourcesWorkingSet" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1643964862546_1" label="Java Test Sources" name="Java Test Sources"/>
|
||||
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1643964864740_2" label="Window Working Set" name="Aggregate for window 1643964864740"/>
|
||||
</workingSetManager>
|
3
.metadata/version.ini
Normal file
3
.metadata/version.ini
Normal file
@ -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
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -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<Restaurant> 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));
|
||||
|
@ -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<Role> roles = new ArrayList<Role>();
|
||||
private Collection<Preference> preference = new ArrayList<Preference>();
|
||||
|
||||
|
||||
public Personne() {
|
||||
@ -106,5 +110,17 @@ public class Personne {
|
||||
public void setRoles(Collection<Role> roles) {
|
||||
this.roles = roles;
|
||||
}
|
||||
|
||||
|
||||
@OneToMany(mappedBy = "preferencePK.personne", cascade = CascadeType.REMOVE)
|
||||
@JsonIgnore
|
||||
public Collection<Preference> getPreference() {
|
||||
return preference;
|
||||
}
|
||||
|
||||
|
||||
public void setPreference(Collection<Preference> preference) {
|
||||
this.preference = preference;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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<TypeRestau> typerestaus = new ArrayList<TypeRestau>();
|
||||
|
||||
private Collection<Preference> preference = new ArrayList<Preference>();
|
||||
//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<TypeRestau> 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<TypeRestau> getTyperestaus() {
|
||||
return typerestaus;
|
||||
}
|
||||
@ -150,5 +152,17 @@ public class Restaurant {
|
||||
public void setTyperestaus(Collection<TypeRestau> typerestaus) {
|
||||
this.typerestaus = typerestaus;
|
||||
}
|
||||
|
||||
|
||||
@OneToMany(mappedBy = "preferencePK.restau", cascade = CascadeType.REMOVE)
|
||||
@JsonIgnore
|
||||
public Collection<Preference> getPreference() {
|
||||
return preference;
|
||||
}
|
||||
|
||||
|
||||
public void setPreference(Collection<Preference> preference) {
|
||||
this.preference = preference;
|
||||
}
|
||||
|
||||
}
|
||||
|
557
src/main/resources/Postman
Normal file
557
src/main/resources/Postman
Normal file
@ -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": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -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
|
@ -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é');
|
||||
|
Loading…
Reference in New Issue
Block a user