diff --git a/demo/module-parsing/src/main/resources/application.yml b/demo/module-parsing/src/main/resources/application.yml index d2b2103..7a321b7 100644 --- a/demo/module-parsing/src/main/resources/application.yml +++ b/demo/module-parsing/src/main/resources/application.yml @@ -1,11 +1,11 @@ -spring: - datasource: - driver-class-name: org.postgresql.Driver - url: jdbc:postgresql://localhost:5432/postgres - username: postgres - password: postgres - jpa: - database-platform: org.hibernate.dialect.PostgreSQLDialect - properties: - hibernate: +spring: + datasource: + driver-class-name: org.postgresql.Driver + url: jdbc:postgresql://localhost:55666/postgres + username: postgres + password: postgres + jpa: + database-platform: org.hibernate.dialect.PostgreSQLDialect + properties: + hibernate: show_sql: false \ No newline at end of file diff --git a/demo/module-reporting/docker-compose.yml b/demo/module-reporting/docker-compose.yml index 3ac0e62..f9394bb 100644 --- a/demo/module-reporting/docker-compose.yml +++ b/demo/module-reporting/docker-compose.yml @@ -1,17 +1,18 @@ -version: '3.9' - -services: - postgres: - image: postgres:16.2 - ports: - - "5432:5432" - volumes: - - postgres_data:/var/lib/postgresql/data - - ./src/test/resources/init.sql:/docker-entrypoint-initdb.d/init.sql - environment: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - -volumes: - postgres_data: +version: '3.9' + +services: + postgres: + image: postgres:16.2 + container_name: soldat_ram_bdd + ports: + - "55666:5432" + volumes: + - postgres_data:/var/lib/postgresql/data + - ./src/test/resources/init.sql:/docker-entrypoint-initdb.d/init.sql + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: postgres + +volumes: + postgres_data: diff --git a/demo/module-reporting/src/main/resources/application.yml b/demo/module-reporting/src/main/resources/application.yml index d2b2103..38075d0 100644 --- a/demo/module-reporting/src/main/resources/application.yml +++ b/demo/module-reporting/src/main/resources/application.yml @@ -1,7 +1,7 @@ spring: datasource: driver-class-name: org.postgresql.Driver - url: jdbc:postgresql://localhost:5432/postgres + url: jdbc:postgresql://localhost:55666/postgres username: postgres password: postgres jpa: diff --git a/demo/module-reporting/src/test/resources/generate_data.sh b/demo/module-reporting/src/test/resources/generate_data.sh index ec46081..5a50afa 100755 --- a/demo/module-reporting/src/test/resources/generate_data.sh +++ b/demo/module-reporting/src/test/resources/generate_data.sh @@ -11,17 +11,17 @@ generate_random_text() { # Définition des valeurs possibles pour les champs codes_postaux=('33300' '24002' '12003' '45004' '75005' '65006' '75007' '75008' '75009' '75010') -pays=('France' 'Germany' 'United Kingdom' 'Italy' 'Spain' 'Portugal' 'Netherlands' 'Belgium' 'Switzerland' 'Austria') +listePays=('France' 'Germany' 'United Kingdom' 'Italy' 'Spain' 'Portugal' 'Netherlands' 'Belgium' 'Switzerland' 'Austria') noms_destinataires=('Forrest Gump' 'Woody' 'Captain John Miller' 'Chuck Noland' 'Walt Disney' 'Paul Edgecomb' 'Joe Fox' 'Ben Bradlee' 'Jim Lovell' 'Charlie Wilson' 'Josh Baskin' 'James Donovan' 'Andrew Beckett' 'Larry Crowne' 'David S. Pumpkins' 'Michael Sullivan' 'Richard Phillips' 'Joe Banks' 'James Mattingly' 'Carl Hanratty') noms_expediteurs=('Forrest Gump' 'Woody' 'Captain John Miller' 'Chuck Noland' 'Walt Disney' 'Paul Edgecomb' 'Joe Fox' 'Ben Bradlee' 'Jim Lovell' 'Charlie Wilson' 'Josh Baskin' 'James Donovan' 'Andrew Beckett' 'Larry Crowne' 'David S. Pumpkins' 'Michael Sullivan' 'Richard Phillips' 'Joe Banks' 'James Mattingly' 'Carl Hanratty') # Génération des insertions SQL for (( i=1; i<=4000000; i++ )); do code_postal="${codes_postaux[$RANDOM % ${#codes_postaux[@]}]}" - pays="${pays[$RANDOM % ${#pays[@]}]}" + pays="${listePays[$RANDOM % ${#listePays[@]}]}" destinataire="${noms_destinataires[$RANDOM % ${#noms_destinataires[@]}]}" expediteur="${noms_expediteurs[$RANDOM % ${#noms_expediteurs[@]}]}" contenu="Contenu du courrier numéro $i" - echo "INSERT INTO courrier (code_postal, ville, pays, destinataire, expediteur, contenu) VALUES ('$code_postal', 'Philadelphie', '$pays', '$destinataire', '$expediteur', '$contenu');" + echo "INSERT INTO courrier (code_postal, ville, pays, destinataire, expediteur, contenu) VALUES ('$code_postal', 'Philadelphie', '$pays', '$destinataire', '$expediteur', '$contenu');" >> data.sql done diff --git a/demo/module-tri-courriers/src/main/resources/application.yml b/demo/module-tri-courriers/src/main/resources/application.yml index 84bca1d..c4a67a4 100644 --- a/demo/module-tri-courriers/src/main/resources/application.yml +++ b/demo/module-tri-courriers/src/main/resources/application.yml @@ -1,11 +1,11 @@ -spring: - datasource: - driver-class-name: org.postgresql.Driver - url: jdbc:postgresql://localhost:5432/postgres - username: postgres - password: postgres - jpa: - database-platform: org.hibernate.dialect.PostgreSQLDialect - properties: - hibernate: +spring: + datasource: + driver-class-name: org.postgresql.Driver + url: jdbc:postgresql://localhost:55666/postgres + username: postgres + password: postgres + jpa: + database-platform: org.hibernate.dialect.PostgreSQLDialect + properties: + hibernate: show_sql: true \ No newline at end of file