From c17b9ab252abc2e98b1b6a2f7218b6b11fccddf4 Mon Sep 17 00:00:00 2001
From: Paulo <pimenta@cines.fr>
Date: Wed, 8 Jul 2020 16:16:29 +0200
Subject: [PATCH] fix(pom): correction du fichier pom et dependences
 spring-boot

---
 ui/ui-frontend/package-lock.json              |   2 +-
 ui/ui-pastis/pom.xml                          | 413 +++++++++---------
 .../configuration/PastisConfiguration.java    |  15 +-
 3 files changed, 204 insertions(+), 226 deletions(-)

diff --git a/ui/ui-frontend/package-lock.json b/ui/ui-frontend/package-lock.json
index 8f5f240..64ec000 100644
--- a/ui/ui-frontend/package-lock.json
+++ b/ui/ui-frontend/package-lock.json
@@ -11492,7 +11492,7 @@
     },
     "ui-frontend-common": {
       "version": "file:../ui-frontend-common/ui-frontend-common-0.0.14.tgz",
-      "integrity": "sha512-xKs1fXesiBR99sYzsf5ik181T6vxwnv27r3Pz7dP7LCtvymJq4ft2dmOwJD625HGE25wREKPIi3w3fnk+ysW5Q==",
+      "integrity": "sha512-qNzZSU23nncAkaBhDm2w+ES/snMwv2LUTNzg8tQTVyeLtgghHOH3n3zOq/hDhyCbWQe/2ZZqtASjXCMZ5oAAag==",
       "requires": {
         "@angular/animations": "8.0.0",
         "@angular/cdk": "^8.0.0",
diff --git a/ui/ui-pastis/pom.xml b/ui/ui-pastis/pom.xml
index 51c2f13..9d25ddd 100644
--- a/ui/ui-pastis/pom.xml
+++ b/ui/ui-pastis/pom.xml
@@ -1,217 +1,198 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0"
-		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<packaging>war</packaging>
-	<url>http://maven.apache.org</url>
-	<artifactId>pastis-api</artifactId>
-	<name>VITAMUI UI Pastis-API</name>
-
-    <parent>
-        <groupId>fr.gouv.vitamui</groupId>
-        <artifactId>ui-parent</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
-    </parent>
-
-
-	<properties>
-		<!-- Generic properties -->
-		<maven.compile.target>1.8</maven.compile.target>
-		<maven.compile.source>1.8</maven.compile.source>
-		<java.version>8</java.version>
-	</properties>
-
-	<dependencies>
-
-		<!--Start of Jaxb API and it's implementation and dependencies- Java11-->
-		<dependency>
-			<groupId>javax.xml.bind</groupId>
-			<artifactId>jaxb-api</artifactId>
-			<version>2.3.1</version>
-		</dependency>
-
-		<dependency>
-			<groupId>com.sun.xml.bind</groupId>
-			<artifactId>jaxb-impl</artifactId>
-			<version>2.3.1</version>
-		</dependency>
-
-		<dependency>
-			<groupId>com.sun.istack</groupId>
-			<artifactId>istack-commons-runtime</artifactId>
-			<version>4.0.0-M2</version>
-		</dependency>
-
-		<!--End of Jaxb API and it's implementation and dependencies- Java11-->
-
-		<dependency>
-			<groupId>org.json</groupId>
-			<artifactId>json</artifactId>
-			<version>20180813</version>
-		</dependency>
-
-		<dependency>
-			<groupId>javax.xml.parsers</groupId>
-			<artifactId>jaxp-api</artifactId>
-			<version>1.4.5</version>
-		</dependency>
-
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-core</artifactId>
-            <version>5.2.7.RELEASE</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter</artifactId>
-        </dependency>
-
-		<!-- Start of SpringBoot starter web (Tomcat by default) and starter test-->
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-web</artifactId>
-            <version>2.3.1.RELEASE</version>
-		</dependency>
-		<!-- Start of SpringBoot starter parent (from mvn command line)-->
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-parent</artifactId>
-			<version>2.3.0.RELEASE</version>
-			<type>pom</type>
-		</dependency>
-
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-tomcat</artifactId>
-			<version>2.2.6.RELEASE</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-test</artifactId>
-			<scope>test</scope>
-			<version>2.2.6.RELEASE</version>
-			<exclusions>
-				<exclusion>
-					<groupId>com.vaadin.external.google</groupId>
-					<artifactId>android-json</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<!-- End of SpringBoot starter web and starter test-->
-
-		<dependency>
-			<groupId>com.fasterxml</groupId>
-			<artifactId>jackson-xml-databind</artifactId>
-			<version>0.6.2</version>
-		</dependency>
-
-	</dependencies>
-
-	<!-- Start of profiles -->
-	<profiles>
-		<!-- Profile 1 - Production -->
-		<profile>
-			<id>prod</id>
-			<!-- Start of production plugins -->
-			<build>
-
-				<plugins>
-					<!-- SpringBoot maven plugin-->
-					<plugin>
-						<groupId>org.springframework.boot</groupId>
-						<artifactId>spring-boot-maven-plugin</artifactId>
-						<version>2.2.6.RELEASE</version>
-					</plugin>
-
-					<!-- Read the application.properties files with the properties plug-in -->
-					<plugin>
-						<groupId>org.codehaus.mojo</groupId>
-						<artifactId>properties-maven-plugin</artifactId>
-						<version>1.0-alpha-2</version>
-						<executions>
-							<execution>
-								<phase>initialize</phase>
-								<goals>
-									<goal>read-project-properties</goal>
-								</goals>
-								<configuration>
-									<files>
-										<file>${project.basedir}/src/main/resources/application.properties</file>
-									</files>
-								</configuration>
-							</execution>
-						</executions>
-					</plugin>
-				</plugins>
-
-				<!-- Tests -->
-				<testResources>
-					<testResource>
-						<directory>${project.basedir}/src/test/resources</directory>
-					</testResource>
-				</testResources>
-
-				<finalName>${war.dev.filename}</finalName>
-
-			</build>
-
-		</profile>
-		<!-- End of Prod profile -->
-
-		<!-- Start of Dev profile -->
-		<profile>
-			<id>dev</id>
-
-			<activation>
-				<activeByDefault>true</activeByDefault>
-			</activation>
-			<!--Active spring boot's application.properties profile (dev or prod)-->
-			<properties>
-				<activatedProperties>dev</activatedProperties>
-			</properties>
-			<build>
-				<!-- Start of dev profile plugins -->
-				<plugins>
-					<!-- SpringBoot maven plugin-->
-					<plugin>
-						<groupId>org.springframework.boot</groupId>
-						<artifactId>spring-boot-maven-plugin</artifactId>
-						<version>2.2.6.RELEASE</version>
-					</plugin>
-
-					<!-- Read the application.properties files with the properties plug-in -->
-					<plugin>
-						<groupId>org.codehaus.mojo</groupId>
-						<artifactId>properties-maven-plugin</artifactId>
-						<version>1.0-alpha-2</version>
-						<executions>
-							<execution>
-								<phase>initialize</phase>
-								<goals>
-									<goal>read-project-properties</goal>
-								</goals>
-								<configuration>
-									<files>
-										<file>${project.basedir}/src/main/resources/application.properties</file>
-									</files>
-								</configuration>
-							</execution>
-						</executions>
-					</plugin>
-				</plugins>
-
-				<!-- Tests -->
-				<testResources>
-					<testResource>
-						<directory>${project.basedir}/src/test/resources</directory>
-					</testResource>
-				</testResources>
-				<finalName>${war.dev.filename}</finalName>
-			</build>
-		</profile>
-		<!-- End of Dev profile -->
-
-	</profiles>
-</project>
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<modelVersion>4.0.0</modelVersion>
+<packaging>war</packaging>
+<url>http://maven.apache.org</url>
+<artifactId>pastis-api</artifactId>
+<name>VITAMUI UI Pastis-API</name>
+
+<parent>
+<groupId>fr.gouv.vitamui</groupId>
+<artifactId>ui-parent</artifactId>
+<version>1.0.0-SNAPSHOT</version>
+</parent>
+
+
+<properties>
+<!-- Generic properties -->
+<maven.compile.target>1.8</maven.compile.target>
+<maven.compile.source>1.8</maven.compile.source>
+<java.version>8</java.version>
+</properties>
+
+<dependencies>
+
+<!--Start of Jaxb API and it's implementation and dependencies- Java11-->
+<dependency>
+    <groupId>javax.xml.bind</groupId>
+    <artifactId>jaxb-api</artifactId>
+    <version>2.3.1</version>
+</dependency>
+
+<dependency>
+    <groupId>com.sun.xml.bind</groupId>
+    <artifactId>jaxb-impl</artifactId>
+    <version>2.3.1</version>
+</dependency>
+
+<dependency>
+    <groupId>com.sun.istack</groupId>
+    <artifactId>istack-commons-runtime</artifactId>
+    <version>4.0.0-M2</version>
+</dependency>
+
+<!--End of Jaxb API and it's implementation and dependencies- Java11-->
+
+<dependency>
+    <groupId>org.json</groupId>
+    <artifactId>json</artifactId>
+    <version>20180813</version>
+</dependency>
+
+<dependency>
+    <groupId>javax.xml.parsers</groupId>
+    <artifactId>jaxp-api</artifactId>
+    <version>1.4.5</version>
+</dependency>
+
+
+<!-- Start of SpringBoot starter web (Tomcat by default) and starter test-->
+<dependency>
+    <groupId>org.springframework.boot</groupId>
+    <artifactId>spring-boot-starter-web</artifactId>
+</dependency>
+<!-- Start of SpringBoot starter parent (from mvn command line)-->
+
+<dependency>
+    <groupId>org.springframework.boot</groupId>
+    <artifactId>spring-boot-starter-tomcat</artifactId>
+</dependency>
+
+<dependency>
+    <groupId>org.springframework.boot</groupId>
+    <artifactId>spring-boot-starter-test</artifactId>
+    <scope>test</scope>
+    <exclusions>
+        <exclusion>
+            <groupId>com.vaadin.external.google</groupId>
+            <artifactId>android-json</artifactId>
+        </exclusion>
+    </exclusions>
+</dependency>
+<!-- End of SpringBoot starter web and starter test-->
+
+<dependency>
+    <groupId>com.fasterxml</groupId>
+    <artifactId>jackson-xml-databind</artifactId>
+    <version>0.6.2</version>
+</dependency>
+
+</dependencies>
+
+    <!-- Start of profiles -->
+<profiles>
+<!-- Profile 1 - Production -->
+<profile>
+    <id>prod</id>
+    <!-- Start of production plugins -->
+    <build>
+
+        <plugins>
+            <!-- SpringBoot maven plugin-->
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.2.6.RELEASE</version>
+            </plugin>
+
+            <!-- Read the application.properties files with the properties plug-in -->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>properties-maven-plugin</artifactId>
+                <version>1.0-alpha-2</version>
+                <executions>
+                    <execution>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>read-project-properties</goal>
+                        </goals>
+                        <configuration>
+                            <files>
+                                <file>${project.basedir}/src/main/resources/application.properties</file>
+                            </files>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+
+        <!-- Tests -->
+        <testResources>
+            <testResource>
+                <directory>${project.basedir}/src/test/resources</directory>
+            </testResource>
+        </testResources>
+
+        <finalName>${war.dev.filename}</finalName>
+
+    </build>
+
+</profile>
+<!-- End of Prod profile -->
+
+<!-- Start of Dev profile -->
+<profile>
+    <id>dev</id>
+
+    <activation>
+        <activeByDefault>true</activeByDefault>
+    </activation>
+    <!--Active spring boot's application.properties profile (dev or prod)-->
+    <properties>
+        <activatedProperties>dev</activatedProperties>
+    </properties>
+    <build>
+        <!-- Start of dev profile plugins -->
+        <plugins>
+            <!-- SpringBoot maven plugin-->
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.2.6.RELEASE</version>
+            </plugin>
+
+            <!-- Read the application.properties files with the properties plug-in -->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>properties-maven-plugin</artifactId>
+                <version>1.0-alpha-2</version>
+                <executions>
+                    <execution>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>read-project-properties</goal>
+                        </goals>
+                        <configuration>
+                            <files>
+                                <file>${project.basedir}/src/main/resources/application.properties</file>
+                            </files>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+
+        <!-- Tests -->
+        <testResources>
+            <testResource>
+                <directory>${project.basedir}/src/test/resources</directory>
+            </testResource>
+        </testResources>
+        <finalName>${war.dev.filename}</finalName>
+    </build>
+</profile>
+<!-- End of Dev profile -->
+
+</profiles>
+    </project>
diff --git a/ui/ui-pastis/src/main/java/fr/gouv/vitamui/pastis/configuration/PastisConfiguration.java b/ui/ui-pastis/src/main/java/fr/gouv/vitamui/pastis/configuration/PastisConfiguration.java
index c17d2cd..3f50e9f 100644
--- a/ui/ui-pastis/src/main/java/fr/gouv/vitamui/pastis/configuration/PastisConfiguration.java
+++ b/ui/ui-pastis/src/main/java/fr/gouv/vitamui/pastis/configuration/PastisConfiguration.java
@@ -1,23 +1,20 @@
 package fr.gouv.vitamui.pastis.configuration;
 
-import org.springframework.context.annotation.Bean;
+
 import org.springframework.context.annotation.Configuration;
 import org.springframework.web.servlet.config.annotation.CorsRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 @Configuration
-public class PastisConfiguration {
+public class PastisConfiguration implements WebMvcConfigurer {
 
-    @Bean
-    public WebMvcConfigurer corsConfigurer() {
-        return new WebMvcConfigurer () {
             @Override
-            public void addCorsMappings(CorsRegistry registry) {
+            public void  addCorsMappings(CorsRegistry registry) {
                 registry.addMapping("/**")
                         .allowedOrigins("http://10.100.129.51","http://vps795748.ovh.net",
                                 "https://localhost:4251","https://dev.vitamui.com:4251","http://145.239.92.134")
                         .allowedMethods("POST", "GET","PUT");
             }
-        };
-    }
-}
\ No newline at end of file
+};
+
+
-- 
GitLab