Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/org/gridsuite/gateway/GatewayConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public RouteLocator myRoutes(RouteLocatorBuilder builder, ApplicationContext con
.route(p -> context.getBean(DynamicSimulationServer.class).getRoute(p))
.route(p -> context.getBean(CaseImportServer.class).getRoute(p))
.route(p -> context.getBean(VoltageInitServer.class).getRoute(p))
.route(p -> context.getBean(ShortCircuitServer.class).getRoute(p))
.build();
}
}
3 changes: 3 additions & 0 deletions src/main/java/org/gridsuite/gateway/ServiceURIsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,7 @@ public class ServiceURIsConfig {

@Value("${gridsuite.services.voltage-init-server.base-uri:http://voltage-init-server/}")
String voltageInitServerBaseUri;

@Value("${gridsuite.services.shortcircuit-server.base-uri:http://shortcircuit-server/}")
String shortCircuitServerBaseUri;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
Copyright (c) 2023, RTE (http://www.rte-france.com)
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package org.gridsuite.gateway.endpoints;

import org.gridsuite.gateway.ServiceURIsConfig;
import org.springframework.stereotype.Component;

/**
* @author Florent MILLOT <florent.millot@rte-france.com>
*/
@Component(value = ShortCircuitServer.ENDPOINT_NAME)
public class ShortCircuitServer implements EndPointServer {

public static final String ENDPOINT_NAME = "shortcircuit";

private final ServiceURIsConfig servicesURIsConfig;

public ShortCircuitServer(ServiceURIsConfig servicesURIsConfig) {
this.servicesURIsConfig = servicesURIsConfig;
}

@Override
public String getEndpointBaseUri() {
return servicesURIsConfig.getShortCircuitServerBaseUri();
}

@Override
public String getEndpointName() {
return ENDPOINT_NAME;
}
}
2 changes: 2 additions & 0 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ gridsuite:
base-uri: http://localhost:5039
voltage-init-server:
base-uri: http://localhost:5038
shortcircuit-server:
base-uri: http://localhost:5031