You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sk...@apache.org on 2022/12/08 11:48:12 UTC
[ignite-3] branch main updated: IGNITE-18147 Disabled environment lookup for micronaut. Fixes #1382
This is an automated email from the ASF dual-hosted git repository.
sk0x50 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new 1987b36bf5 IGNITE-18147 Disabled environment lookup for micronaut. Fixes #1382
1987b36bf5 is described below
commit 1987b36bf50eb473e9c494747f81cdf720716978
Author: Aleksandr Pakhomov <ap...@gmail.com>
AuthorDate: Thu Dec 8 13:03:21 2022 +0200
IGNITE-18147 Disabled environment lookup for micronaut. Fixes #1382
Signed-off-by: Slava Koptilin <sl...@gmail.com>
---
.../main/java/org/apache/ignite/internal/rest/RestComponent.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/rest/src/main/java/org/apache/ignite/internal/rest/RestComponent.java b/modules/rest/src/main/java/org/apache/ignite/internal/rest/RestComponent.java
index 4ae58eeb3d..b0878b207b 100644
--- a/modules/rest/src/main/java/org/apache/ignite/internal/rest/RestComponent.java
+++ b/modules/rest/src/main/java/org/apache/ignite/internal/rest/RestComponent.java
@@ -17,6 +17,8 @@
package org.apache.ignite.internal.rest;
+import static io.micronaut.context.env.Environment.BARE_METAL;
+
import io.micronaut.context.ApplicationContext;
import io.micronaut.http.server.exceptions.ServerStartupException;
import io.micronaut.openapi.annotation.OpenAPIInclude;
@@ -104,7 +106,10 @@ public class RestComponent implements IgniteComponent {
for (int portCandidate = desiredPort; portCandidate <= desiredPort + portRange; portCandidate++) {
try {
port = portCandidate;
- context = buildMicronautContext(portCandidate).start();
+ context = buildMicronautContext(portCandidate)
+ .deduceEnvironment(false)
+ .environments(BARE_METAL)
+ .start();
LOG.info("REST protocol started successfully");
return;
} catch (ApplicationStartupException e) {