Unverified Commit 7a943ac1 authored by Benaissa BENARBIA's avatar Benaissa BENARBIA Committed by GitHub
Browse files

[VAS] Vas item 8441 update dev spring config vitamui modules (#400)



* [XEL] Update dev spring config (#359)

* [VAS] Bug 8240 : Access file format on multi tenants organisation (#481)

Co-authored-by: default avatarPassam KASSEM <passam.kassem@focati-solutions.com>

* [TECH FOX-674] Use spring profile for UI

* [TECH FOX-671] Use spring profile for External and Internal layer

Co-authored-by: default avatarKASSEM Passam <passam.kassem@gmail.com>
Co-authored-by: default avatarPassam KASSEM <passam.kassem@focati-solutions.com>
Co-authored-by: default avatarJulien CORNILLE <julien.cornille@xelians.fr>

* Set up version from 4.5.0-SNAPSHOT to 5rc.0

* update vitamui modules with Dev modules simplification, update documents, revert --legacy-peer-deps option

Co-authored-by: default avatarpyXelians <74011448+pyXelians@users.noreply.github.com>
Co-authored-by: default avatarKASSEM Passam <passam.kassem@gmail.com>
Co-authored-by: default avatarPassam KASSEM <passam.kassem@focati-solutions.com>
Co-authored-by: default avatarJulien CORNILLE <julien.cornille@xelians.fr>
Co-authored-by: default avatarvitam-prg <no-reply@programmevitam.fr>
parent 4146b3e7
......@@ -232,11 +232,11 @@ deployment/playbooks/templates/vitamui/conf/*/*.p12
###################################
# Vitam development configuration #
###################################
api/api-archive-search/archive-search-internal/src/main/config/dev-vitam/*
api/api-ingest/ingest-internal/src/main/config/dev-vitam/*
api/api-referential/referential-internal/src/main/config/dev-vitam/*
api/api-ingest/ingest-internal/src/main/config/dev-vitam/*
api/api-iam/iam-internal/src/main/config/dev-vitam/*
api/api-archive-search/archive-search-internal/src/main/resources/dev/vitam/*
api/api-ingest/ingest-internal/src/main/resources/dev/vitam/*
api/api-referential/referential-internal/src/main/resources/dev/vitam/*
api/api-ingest/ingest-internal/src/main/resources/dev/vitam/*
api/api-iam/iam-internal/src/main/resources/dev/vitam/*
##########################################
# Mongo workspace entry-point #
......
......@@ -200,9 +200,7 @@
<arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
<!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
<argument>
--spring.config.additional-location=file:${basedir}/src/main/config/archive-search-external-application-dev.yml
</argument>
<argument>--spring.profiles.active=dev</argument>
</arguments>
</configuration>
</plugin>
......
#!/bin/bash
mkdir -p target/src/main
rm -rf target/src/main/config
cp -r src/main/config target/src/main/config
#retrieve version
version="$(grep -oP '(?<=>).*?(?=</version>)' pom.xml | grep -v 'version')"
./target/archive-search-external-$(echo $version).jar -Xms128m -Xmx512m --spring.profiles.active=dev
......@@ -49,7 +49,6 @@ public class ApiArchivesSearchExternalServerApplication implements CommandLineRu
public static void main(final String[] args) {
final SpringApplication app = new SpringApplicationBuilder(ApiArchivesSearchExternalServerApplication.class)
.properties("spring.config.name:archive-search-external-application")
.build();
app.run(args);
}
......@@ -58,8 +57,6 @@ public class ApiArchivesSearchExternalServerApplication implements CommandLineRu
public void run(final String... args) throws Exception {
LOGGER.info("VITAMUI SpringBoot Application started:");
LOGGER.info("spring.config.name: " + env.getProperty("spring.config.name"));
LOGGER.info("spring.application.name: " + env.getProperty("spring.application.name"));
LOGGER.info("-------------------------------");
LOGGER.info("\n");
}
......
debug: false
spring:
config:
use-legacy-processing: true
profiles:
active: swagger
active: dev, swagger
cloud:
consul: #disabled for dev
......@@ -26,10 +28,10 @@ server:
host:
port: 8089
ssl:
key-store: ../../../dev-deployment/environments/keystores/server/localhost/keystore_archive-search-external.jks
key-store: src/main/resources/dev/keystore_archive-search-external.jks
key-store-password: changeme
key-password: changeme
trust-store: ../../../dev-deployment/environments/keystores/server/truststore_server.jks
trust-store: src/main/resources/dev/truststore_server.jks
trust-store-password: changeme
client-auth: need
enabled-protocols: TLSv1.1,TLSv1.2,TLSv1.3
......
......@@ -33,18 +33,13 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.env.Environment;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit.jupiter.SpringExtension;
@ExtendWith(SpringExtension.class)
@SpringBootTest
@TestPropertySource(properties = {"spring.config.name=archive-search-external-application"})
public class ApiArchivesSearchExternalApplicationTest {
@Autowired
private Environment env;
@Autowired
private ApiArchiveExternalApplicationProperties apiArchiveExternalApplicationProperties;
......@@ -52,8 +47,6 @@ public class ApiArchivesSearchExternalApplicationTest {
@Test
public void testArchiveContextLoads() {
Assertions.assertNotNull(env);
Assertions.assertEquals(env.getProperty("spring.config.name"), "archive-search-external-application");
Assertions.assertNotNull(apiArchiveExternalApplicationProperties);
Assertions.assertNotNull(apiArchiveExternalApplicationProperties.getArchiveSearchInternalClient());
Assertions.assertNotNull(apiArchiveExternalApplicationProperties.getIamInternalClient());
......
......@@ -208,12 +208,12 @@
-Xmx512m -Dvitam.config.folder=${basedir}/src/main/config/dev-vitam
</jvmArguments>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
<!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
<argument>
--spring.config.additional-location=file:${basedir}/src/main/config/archive-search-internal-application-dev.yml
</argument>
<argument>--spring.profiles.active=dev</argument>
</arguments>
</configuration>
</plugin>
......
......@@ -7,4 +7,4 @@ cp -r src/main/config target/src/main/config
#retrieve version
version="$(grep -oP '(?<=>).*?(?=</version>)' pom.xml | grep -v 'version')"
java -Dvitam.config.folder=src/main/config/dev-vitam -jar target/archive-search-internal-$(echo $version).jar -Xms128m -Xmx512m --spring.config.additional-location=file:src/main/config/archive-search-internal-application-dev.yml
java -Dvitam.config.folder=src/main/resources/dev/vitam -jar target/archive-search-internal-$(echo $version).jar -Xms128m -Xmx512m --spring.profiles.active=dev
serverHost: access-external.service.consul
serverPort: 8444
secure: true
sslConfiguration :
keystore :
- keyPath: keystore_ihm-demo.p12
keyPassword: azerty4
truststore :
- keyPath: truststore_ihm-demo.jks
keyPassword: azerty10
hostnameVerification: true
serverHost: ingest-external.service.consul
serverPort: 8443
secure: true
sslConfiguration :
keystore :
- keyPath: keystore_ihm-demo.p12
keyPassword: azerty4
truststore :
- keyPath: truststore_ihm-demo.jks
keyPassword: azerty10
hostnameVerification: true
......@@ -48,7 +48,6 @@ public class ApiArchiveInternalServerApplication implements CommandLineRunner {
public static void main(final String[] args) {
final SpringApplication app = new SpringApplicationBuilder(ApiArchiveInternalServerApplication.class)
.properties("spring.config.name:archive-search-internal-application")
.build();
app.run(args);
}
......@@ -56,8 +55,6 @@ public class ApiArchiveInternalServerApplication implements CommandLineRunner {
@Override
public void run(final String... args) throws Exception {
LOGGER.info("VITAMUI SpringBoot Application started:");
LOGGER.info("spring.config.name: " + env.getProperty("spring.config.name"));
LOGGER.info("spring.application.name: " + env.getProperty("spring.application.name"));
LOGGER.info("vitam.config.folder: " + env.getProperty("vitam.config.folder"));
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment