Skip to content
Snippets Groups Projects
Commit fb1d3dbf authored by Martin Weise's avatar Martin Weise
Browse files

fixed mapstruct

parent 83b10025
No related branches found
No related tags found
No related merge requests found
Showing
with 122 additions and 98 deletions
...@@ -41,20 +41,20 @@ deploy-dev: ...@@ -41,20 +41,20 @@ deploy-dev:
variables: variables:
TAG: latest TAG: latest
script: script:
- docker build -t $CI_REGISTRY/fda-analyse-service:$TAG ./fda-analyse-service - docker build -t $CI_REGISTRY/fda-analyse-at.tuwien.service:$TAG ./fda-analyse-at.tuwien.service
- docker push $CI_REGISTRY/fda-analyse-service:$TAG - docker push $CI_REGISTRY/fda-analyse-at.tuwien.service:$TAG
- docker build -t $CI_REGISTRY/fda-discovery-server:$TAG ./fda-discovery-server - docker build -t $CI_REGISTRY/fda-discovery-server:$TAG ./fda-discovery-server
- docker push $CI_REGISTRY/fda-discovery-server:$TAG - docker push $CI_REGISTRY/fda-discovery-server:$TAG
- docker build -t $CI_REGISTRY/fda-gateway-service:$TAG ./fda-gateway-service - docker build -t $CI_REGISTRY/fda-gateway-at.tuwien.service:$TAG ./fda-gateway-at.tuwien.service
- docker push $CI_REGISTRY/fda-gateway-service:$TAG - docker push $CI_REGISTRY/fda-gateway-at.tuwien.service:$TAG
- docker build -t $CI_REGISTRY/fda-database-managing-service:$TAG ./fda-database-managing-service - docker build -t $CI_REGISTRY/fda-database-managing-at.tuwien.service:$TAG ./fda-database-managing-at.tuwien.service
- docker push $CI_REGISTRY/fda-database-managing-service:$TAG - docker push $CI_REGISTRY/fda-database-managing-at.tuwien.service:$TAG
- docker build -t $CI_REGISTRY/fda-container-managing-service:$TAG ./fda-container-managing-service - docker build -t $CI_REGISTRY/fda-container-managing-at.tuwien.service:$TAG ./fda-container-managing-at.tuwien.service
- docker push $CI_REGISTRY/fda-container-managing-service:$TAG - docker push $CI_REGISTRY/fda-container-managing-at.tuwien.service:$TAG
- docker build -t $CI_REGISTRY/fda-query-service:$TAG ./fda-query-service - docker build -t $CI_REGISTRY/fda-query-at.tuwien.service:$TAG ./fda-query-at.tuwien.service
- docker push $CI_REGISTRY/fda-query-service:$TAG - docker push $CI_REGISTRY/fda-query-at.tuwien.service:$TAG
- docker build -t $CI_REGISTRY/fda-table-service:$TAG ./fda-table-service - docker build -t $CI_REGISTRY/fda-table-at.tuwien.service:$TAG ./fda-table-at.tuwien.service
- docker push $CI_REGISTRY/fda-table-service:$TAG - docker push $CI_REGISTRY/fda-table-at.tuwien.service:$TAG
- docker build -t $CI_REGISTRY/fda-ui:$TAG ./fda-ui - docker build -t $CI_REGISTRY/fda-ui:$TAG ./fda-ui
- docker push $CI_REGISTRY/fda-ui:$TAG - docker push $CI_REGISTRY/fda-ui:$TAG
- docker logout $CI_REGISTRY - docker logout $CI_REGISTRY
...@@ -66,20 +66,20 @@ deploy-prod: ...@@ -66,20 +66,20 @@ deploy-prod:
variables: variables:
TAG: stable TAG: stable
script: script:
- docker build -t $CI_REGISTRY/fda-analyse-service:$TAG ./fda-analyse-service - docker build -t $CI_REGISTRY/fda-analyse-at.tuwien.service:$TAG ./fda-analyse-at.tuwien.service
- docker push $CI_REGISTRY/fda-analyse-service:$TAG - docker push $CI_REGISTRY/fda-analyse-at.tuwien.service:$TAG
- docker build -t $CI_REGISTRY/fda-discovery-server:$TAG ./fda-discovery-server - docker build -t $CI_REGISTRY/fda-discovery-server:$TAG ./fda-discovery-server
- docker push $CI_REGISTRY/fda-discovery-server:$TAG - docker push $CI_REGISTRY/fda-discovery-server:$TAG
- docker build -t $CI_REGISTRY/fda-gateway-service:$TAG ./fda-gateway-service - docker build -t $CI_REGISTRY/fda-gateway-at.tuwien.service:$TAG ./fda-gateway-at.tuwien.service
- docker push $CI_REGISTRY/fda-gateway-service:$TAG - docker push $CI_REGISTRY/fda-gateway-at.tuwien.service:$TAG
- docker build -t $CI_REGISTRY/fda-database-managing-service:$TAG ./fda-database-managing-service - docker build -t $CI_REGISTRY/fda-database-managing-at.tuwien.service:$TAG ./fda-database-managing-at.tuwien.service
- docker push $CI_REGISTRY/fda-database-managing-service:$TAG - docker push $CI_REGISTRY/fda-database-managing-at.tuwien.service:$TAG
- docker build -t $CI_REGISTRY/fda-container-managing-service:$TAG ./fda-container-managing-service - docker build -t $CI_REGISTRY/fda-container-managing-at.tuwien.service:$TAG ./fda-container-managing-at.tuwien.service
- docker push $CI_REGISTRY/fda-container-managing-service:$TAG - docker push $CI_REGISTRY/fda-container-managing-at.tuwien.service:$TAG
- docker build -t $CI_REGISTRY/fda-query-service:$TAG ./fda-query-service - docker build -t $CI_REGISTRY/fda-query-at.tuwien.service:$TAG ./fda-query-at.tuwien.service
- docker push $CI_REGISTRY/fda-query-service:$TAG - docker push $CI_REGISTRY/fda-query-at.tuwien.service:$TAG
- docker build -t $CI_REGISTRY/fda-table-service:$TAG ./fda-table-service - docker build -t $CI_REGISTRY/fda-table-at.tuwien.service:$TAG ./fda-table-at.tuwien.service
- docker push $CI_REGISTRY/fda-table-service:$TAG - docker push $CI_REGISTRY/fda-table-at.tuwien.service:$TAG
- docker build -t $CI_REGISTRY/fda-ui:$TAG ./fda-ui - docker build -t $CI_REGISTRY/fda-ui:$TAG ./fda-ui
- docker push $CI_REGISTRY/fda-ui:$TAG - docker push $CI_REGISTRY/fda-ui:$TAG
- docker logout $CI_REGISTRY - docker logout $CI_REGISTRY
......
...@@ -11,13 +11,13 @@ docker login https://docker.martinweise.at ...@@ -11,13 +11,13 @@ docker login https://docker.martinweise.at
``` ```
```bash ```bash
docker pull docker.martinweise.at/fda-analyse-service docker pull docker.martinweise.at/fda-analyse-at.tuwien.service
docker pull docker.martinweise.at/fda-discovery-server docker pull docker.martinweise.at/fda-discovery-server
docker pull docker.martinweise.at/fda-gateway-service docker pull docker.martinweise.at/fda-gateway-at.tuwien.service
docker pull docker.martinweise.at/fda-database-managing-service docker pull docker.martinweise.at/fda-database-managing-at.tuwien.service
docker pull docker.martinweise.at/fda-container-managing-service docker pull docker.martinweise.at/fda-container-managing-at.tuwien.service
docker pull docker.martinweise.at/fda-query-service docker pull docker.martinweise.at/fda-query-at.tuwien.service
docker pull docker.martinweise.at/fda-table-service docker pull docker.martinweise.at/fda-table-at.tuwien.service
docker pull docker.martinweise.at/fda-ui docker pull docker.martinweise.at/fda-ui
``` ```
......
...@@ -13,9 +13,9 @@ services: ...@@ -13,9 +13,9 @@ services:
- 9090:9090 - 9090:9090
fda-gateway-service: fda-gateway-service:
container_name: fda-gateway-service container_name: fda-gateway-at.tuwien.service
hostname: fda-gateway-service hostname: fda-gateway-at.tuwien.service
image: docker.martinweise.at/fda-gateway-service:latest image: docker.martinweise.at/fda-gateway-at.tuwien.service:latest
network_mode: bridge network_mode: bridge
environment: environment:
SPRING_PROFILES_ACTIVE: docker SPRING_PROFILES_ACTIVE: docker
...@@ -37,9 +37,9 @@ services: ...@@ -37,9 +37,9 @@ services:
driver: json-file driver: json-file
fda-database-managing-service: fda-database-managing-service:
container_name: fda-database-managing-service container_name: fda-database-managing-at.tuwien.service
hostname: fda-database-managing-service hostname: fda-database-managing-at.tuwien.service
image: docker.martinweise.at/fda-database-managing-service:latest image: docker.martinweise.at/fda-database-managing-at.tuwien.service:latest
network_mode: bridge network_mode: bridge
environment: environment:
SPRING_PROFILES_ACTIVE: docker SPRING_PROFILES_ACTIVE: docker
...@@ -55,9 +55,9 @@ services: ...@@ -55,9 +55,9 @@ services:
driver: json-file driver: json-file
fda-container-managing-service: fda-container-managing-service:
container_name: fda-container-managing-service container_name: fda-container-managing-at.tuwien.service
hostname: fda-container-managing-service hostname: fda-container-managing-at.tuwien.service
image: docker.martinweise.at/fda-container-managing-service:latest image: docker.martinweise.at/fda-container-managing-at.tuwien.service:latest
network_mode: bridge network_mode: bridge
environment: environment:
SPRING_PROFILES_ACTIVE: docker SPRING_PROFILES_ACTIVE: docker
...@@ -73,9 +73,9 @@ services: ...@@ -73,9 +73,9 @@ services:
driver: json-file driver: json-file
fda-query-service: fda-query-service:
container_name: fda-query-service container_name: fda-query-at.tuwien.service
hostname: fda-query-service hostname: fda-query-at.tuwien.service
image: docker.martinweise.at/fda-query-service:latest image: docker.martinweise.at/fda-query-at.tuwien.service:latest
network_mode: bridge network_mode: bridge
environment: environment:
SPRING_PROFILES_ACTIVE: docker SPRING_PROFILES_ACTIVE: docker
...@@ -93,9 +93,9 @@ services: ...@@ -93,9 +93,9 @@ services:
driver: json-file driver: json-file
fda-table-service: fda-table-service:
container_name: fda-table-service container_name: fda-table-at.tuwien.service
hostname: fda-table-service hostname: fda-table-at.tuwien.service
image: docker.martinweise.at/fda-table-service:latest image: docker.martinweise.at/fda-table-at.tuwien.service:latest
network_mode: bridge network_mode: bridge
environment: environment:
SPRING_PROFILES_ACTIVE: docker SPRING_PROFILES_ACTIVE: docker
...@@ -112,9 +112,9 @@ services: ...@@ -112,9 +112,9 @@ services:
- fda-discovery-server - fda-discovery-server
fda-analyse-service: fda-analyse-service:
container_name: fda-analyse-service container_name: fda-analyse-at.tuwien.service
hostname: fda-analyse-service hostname: fda-analyse-at.tuwien.service
image: docker.martinweise.at/fda-analyse-service:latest image: docker.martinweise.at/fda-analyse-at.tuwien.service:latest
network_mode: bridge network_mode: bridge
command: sh -c "/wait && flask run" command: sh -c "/wait && flask run"
environment: environment:
...@@ -149,4 +149,4 @@ services: ...@@ -149,4 +149,4 @@ services:
- fda-discovery-server - fda-discovery-server
environment: environment:
HOST: 0.0.0.0 HOST: 0.0.0.0
API_URL: //fda-database-managing-service:9092/api API_URL: //fda-database-managing-at.tuwien.service:9092/api
...@@ -36,8 +36,8 @@ services: ...@@ -36,8 +36,8 @@ services:
fda-gateway-service: fda-gateway-service:
restart: always restart: always
container_name: fda-gateway-service container_name: fda-gateway-at.tuwien.service
hostname: fda-gateway-service hostname: fda-gateway-at.tuwien.service
build: ./fda-gateway-service build: ./fda-gateway-service
image: fda-gateway-service image: fda-gateway-service
network_mode: bridge network_mode: bridge
...@@ -62,8 +62,8 @@ services: ...@@ -62,8 +62,8 @@ services:
fda-database-managing-service: fda-database-managing-service:
restart: always restart: always
container_name: fda-database-managing-service container_name: fda-database-managing-at.tuwien.service
hostname: fda-database-managing-service hostname: fda-database-managing-at.tuwien.service
build: build:
context: ./fda-database-managing-service context: ./fda-database-managing-service
image: fda-database-managing-service image: fda-database-managing-service
...@@ -83,8 +83,8 @@ services: ...@@ -83,8 +83,8 @@ services:
fda-container-managing-service: fda-container-managing-service:
restart: always restart: always
container_name: fda-container-managing-service container_name: fda-container-managing-at.tuwien.service
hostname: fda-container-managing-service hostname: fda-container-managing-at.tuwien.service
build: ./fda-container-managing-service build: ./fda-container-managing-service
image: fda-container-managing-service image: fda-container-managing-service
network_mode: bridge network_mode: bridge
...@@ -103,8 +103,8 @@ services: ...@@ -103,8 +103,8 @@ services:
fda-query-service: fda-query-service:
restart: always restart: always
container_name: fda-query-service container_name: fda-query-at.tuwien.service
hostname: fda-query-service hostname: fda-query-at.tuwien.service
build: ./fda-query-service build: ./fda-query-service
image: fda-query-service image: fda-query-service
network_mode: bridge network_mode: bridge
...@@ -125,8 +125,8 @@ services: ...@@ -125,8 +125,8 @@ services:
fda-table-service: fda-table-service:
restart: always restart: always
container_name: fda-table-service container_name: fda-table-at.tuwien.service
hostname: fda-table-service hostname: fda-table-at.tuwien.service
build: ./fda-table-service build: ./fda-table-service
image: fda-table-service image: fda-table-service
network_mode: bridge network_mode: bridge
...@@ -146,8 +146,8 @@ services: ...@@ -146,8 +146,8 @@ services:
fda-analyse-service: fda-analyse-service:
restart: always restart: always
container_name: fda-analyse-service container_name: fda-analyse-at.tuwien.service
hostname: fda-analyse-service hostname: fda-analyse-at.tuwien.service
build: ./fda-analyse-service build: ./fda-analyse-service
image: fda-analyse-service image: fda-analyse-service
network_mode: bridge network_mode: bridge
...@@ -186,4 +186,4 @@ services: ...@@ -186,4 +186,4 @@ services:
- fda-discovery-server - fda-discovery-server
environment: environment:
HOST: 0.0.0.0 HOST: 0.0.0.0
API_URL: //fda-database-managing-service:9092/api API_URL: //fda-database-managing-at.tuwien.service:9092/api
...@@ -49,4 +49,4 @@ run `python3 app.py` add '/upload' to url ...@@ -49,4 +49,4 @@ run `python3 app.py` add '/upload' to url
### Running with Docker ### Running with Docker
Building the image: `sudo docker build -t analyse-service .` Building the image: `sudo docker build -t analyse-at.tuwien.service .`
...@@ -77,7 +77,7 @@ def extract_tables(): ...@@ -77,7 +77,7 @@ def extract_tables():
rest_server_port = 5000 rest_server_port = 5000
eureka_client.init(eureka_server=os.getenv('EUREKA_SERVER', 'http://localhost:9090/eureka/'), eureka_client.init(eureka_server=os.getenv('EUREKA_SERVER', 'http://localhost:9090/eureka/'),
app_name="fda-analyse-service", app_name="fda-analyse-at.tuwien.service",
instance_port=rest_server_port) instance_port=rest_server_port)
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<java.version>11</java.version> <java.version>11</java.version>
<spring-cloud.version>Hoxton.SR8</spring-cloud.version> <spring-cloud.version>Hoxton.SR8</spring-cloud.version>
<mapstruct.version>1.4.2.Final</mapstruct.version> <mapstruct.version>1.4.2.Final</mapstruct.version>
<mainClass>at.tuwien.FdaContainerManagingApplication</mainClass>
</properties> </properties>
<dependencies> <dependencies>
...@@ -41,11 +40,13 @@ ...@@ -41,11 +40,13 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId> <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> </dependency>
<!-- DataSource -->
<dependency> <dependency>
<groupId>org.postgresql</groupId> <groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId> <artifactId>postgresql</artifactId>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<!-- Testing -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
...@@ -57,25 +58,18 @@ ...@@ -57,25 +58,18 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <!-- DTO -->
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency> <dependency>
<groupId>io.springfox</groupId> <groupId>io.springfox</groupId>
<artifactId>springfox-spring-web</artifactId> <artifactId>springfox-spring-web</artifactId>
<version>2.9.2</version> <version>2.9.2</version>
</dependency> </dependency>
<!-- IDE -->
<dependency> <dependency>
<groupId>io.swagger</groupId> <groupId>org.projectlombok</groupId>
<artifactId>swagger-annotations</artifactId> <artifactId>lombok</artifactId>
<version>1.5.20</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency> </dependency>
<!-- Docker -->
<dependency> <dependency>
<groupId>com.github.docker-java</groupId> <groupId>com.github.docker-java</groupId>
<artifactId>docker-java-api</artifactId> <artifactId>docker-java-api</artifactId>
...@@ -86,6 +80,34 @@ ...@@ -86,6 +80,34 @@
<artifactId>docker-java</artifactId> <artifactId>docker-java</artifactId>
<version>3.2.1</version> <version>3.2.1</version>
</dependency> </dependency>
<!-- Mapping -->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
<optional>true</optional><!-- IntelliJ -->
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.20</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
<exclusions>
<exclusion>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
......
...@@ -12,7 +12,6 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener; ...@@ -12,7 +12,6 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*; import javax.persistence.*;
import java.time.Instant; import java.time.Instant;
@Data
@EqualsAndHashCode(onlyExplicitlyIncluded = true) @EqualsAndHashCode(onlyExplicitlyIncluded = true)
@ToString(onlyExplicitlyIncluded = true) @ToString(onlyExplicitlyIncluded = true)
@MappedSuperclass @MappedSuperclass
......
...@@ -8,6 +8,7 @@ import java.time.Instant; ...@@ -8,6 +8,7 @@ import java.time.Instant;
@Entity @Entity
@Data
@EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true) @EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true)
@ToString(callSuper = true, onlyExplicitlyIncluded = true) @ToString(callSuper = true, onlyExplicitlyIncluded = true)
public class DatabaseContainer extends Auditable{ public class DatabaseContainer extends Auditable{
...@@ -19,7 +20,7 @@ public class DatabaseContainer extends Auditable{ ...@@ -19,7 +20,7 @@ public class DatabaseContainer extends Auditable{
private Instant containerCreated; private Instant containerCreated;
@Column(nullable = false) @Column(nullable = false)
private String containerName; private String name;
@Column(nullable = false) @Column(nullable = false)
private String databaseName; private String databaseName;
......
...@@ -5,6 +5,7 @@ import at.tuwien.api.dto.container.DatabaseContainerDto; ...@@ -5,6 +5,7 @@ import at.tuwien.api.dto.container.DatabaseContainerDto;
import com.github.dockerjava.api.command.InspectContainerResponse; import com.github.dockerjava.api.command.InspectContainerResponse;
import com.github.dockerjava.api.model.Container; import com.github.dockerjava.api.model.Container;
import at.tuwien.entities.DatabaseContainer; import at.tuwien.entities.DatabaseContainer;
import com.github.dockerjava.api.model.NetworkSettings;
import org.mapstruct.Mapper; import org.mapstruct.Mapper;
import org.mapstruct.Mapping; import org.mapstruct.Mapping;
import org.mapstruct.Mappings; import org.mapstruct.Mappings;
...@@ -13,11 +14,8 @@ import org.mapstruct.Mappings; ...@@ -13,11 +14,8 @@ import org.mapstruct.Mappings;
public interface DatabaseContainerMapper { public interface DatabaseContainerMapper {
@Mappings({ @Mappings({
@Mapping(source = "id", target = "id"), @Mapping(source = "id", target = "containerId"),
@Mapping(source = "name", target = "containerId"), @Mapping(source = "created", target = "containerCreated"),
@Mapping(source = "created", target = "created"),
@Mapping(source = "ipAddress", target = "ipAddress"),
@Mapping(source = "dbName", target = "dbName"),
}) })
DatabaseContainer inspectContainerResponseToDatabaseContainer(InspectContainerResponse containerResponse); DatabaseContainer inspectContainerResponseToDatabaseContainer(InspectContainerResponse containerResponse);
// public DatabaseContainer map(InspectContainerResponse containerResponse) { // public DatabaseContainer map(InspectContainerResponse containerResponse) {
...@@ -28,6 +26,10 @@ public interface DatabaseContainerMapper { ...@@ -28,6 +26,10 @@ public interface DatabaseContainerMapper {
// return databaseContainer; // return databaseContainer;
// } // }
default String networkSettingsNetworksBridgeToIpAddress(NetworkSettings data) {
return data.getNetworks().get("bridge").getIpAddress();
}
DatabaseContainer containerToDatabaseContainer(Container data); DatabaseContainer containerToDatabaseContainer(Container data);
DatabaseContainerBriefDto databaseContainerToDataBaseContainerBriefDto(DatabaseContainer data); DatabaseContainerBriefDto databaseContainerToDataBaseContainerBriefDto(DatabaseContainer data);
......
...@@ -13,7 +13,7 @@ RUN mvn -q clean package > /dev/null ...@@ -13,7 +13,7 @@ RUN mvn -q clean package > /dev/null
###### SECOND STAGE ###### ###### SECOND STAGE ######
FROM openjdk:11-jre-slim as runtime FROM openjdk:11-jre-slim as runtime
COPY --from=build ./target/fda-gateway-service-*.jar ./gateway.jar COPY --from=build ./target/fda-gateway-at.tuwien.service-*.jar ./gateway.jar
EXPOSE 9095 EXPOSE 9095
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>at.tuwien</groupId> <groupId>at.tuwien</groupId>
<artifactId>fda-gateway-service</artifactId> <artifactId>fda-gateway-at.tuwien.service</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<name>fda-gateway-service</name> <name>fda-gateway-at.tuwien.service</name>
<description>Demo project for Spring Boot</description> <description>Demo project for Spring Boot</description>
<properties> <properties>
......
...@@ -11,17 +11,17 @@ public class GatewayConfig { ...@@ -11,17 +11,17 @@ public class GatewayConfig {
@Bean @Bean
public RouteLocator routes(RouteLocatorBuilder builder) { public RouteLocator routes(RouteLocatorBuilder builder) {
return builder.routes() return builder.routes()
.route("database-managing-service", r -> r.path("/database/**") .route("database-managing-at.tuwien.service", r -> r.path("/database/**")
.and() .and()
.method("POST","GET") .method("POST","GET")
.and() .and()
.uri("lb://FDA-Database-Managing")) .uri("lb://FDA-Database-Managing"))
.route("table-service", r -> r.path("/table/**") .route("table-at.tuwien.service", r -> r.path("/table/**")
.and() .and()
.method("POST","GET") .method("POST","GET")
.and() .and()
.uri("lb://FDA-Table-Service")) .uri("lb://FDA-Table-Service"))
.route("query-service", r -> r.path("/query/executeQuery") .route("query-at.tuwien.service", r -> r.path("/query/executeQuery")
.and() .and()
.method("POST") .method("POST")
.and() .and()
......
server.port=9095 server.port=9095
spring.application.name=fda-gateway-service spring.application.name=fda-gateway-at.tuwien.service
spring.main.banner-mode=off spring.main.banner-mode=off
spring.cloud.loadbalancer.ribbon.enabled=false spring.cloud.loadbalancer.ribbon.enabled=false
logging.level.root=warn logging.level.root=warn
......
spring.application.name=fda-gateway-service spring.application.name=fda-gateway-at.tuwien.service
server.port=9095 server.port=9095
eureka.client.serviceUrl.defaultZone=http://localhost:9090/eureka/ eureka.client.serviceUrl.defaultZone=http://localhost:9090/eureka/
\ No newline at end of file
...@@ -9,7 +9,7 @@ RUN mvn -fn -B dependency:go-offline > /dev/null ...@@ -9,7 +9,7 @@ RUN mvn -fn -B dependency:go-offline > /dev/null
COPY ./api ./api COPY ./api ./api
COPY ./gateways ./gateways COPY ./gateways ./gateways
COPY ./persistence ./persistence COPY ./persistence ./persistence
COPY ./rest-service ./rest-service COPY ./rest-at.tuwien.service ./rest-at.tuwien.service
COPY ./services ./services COPY ./services ./services
RUN mvn -q clean package > /dev/null RUN mvn -q clean package > /dev/null
...@@ -17,7 +17,7 @@ RUN mvn -q clean package > /dev/null ...@@ -17,7 +17,7 @@ RUN mvn -q clean package > /dev/null
###### SECOND STAGE ###### ###### SECOND STAGE ######
FROM openjdk:11-jre-slim as runtime FROM openjdk:11-jre-slim as runtime
COPY --from=build ./rest-service/target/fda-query-service-*.jar ./rest.jar COPY --from=build ./rest-at.tuwien.service/target/fda-query-at.tuwien.service-*.jar ./rest.jar
EXPOSE 9093 EXPOSE 9093
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>fda-query-service</artifactId> <artifactId>fda-query-at.tuwien.service</artifactId>
<groupId>at.tuwien</groupId> <groupId>at.tuwien</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>fda-query-service</artifactId> <artifactId>fda-query-at.tuwien.service</artifactId>
<groupId>at.tuwien</groupId> <groupId>at.tuwien</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
......
...@@ -20,7 +20,7 @@ public class FdaContainerManagingClient { ...@@ -20,7 +20,7 @@ public class FdaContainerManagingClient {
} }
public DatabaseContainer getDatabaseContainer(String containerID) { public DatabaseContainer getDatabaseContainer(String containerID) {
LOGGER.debug("request fda-container-managing service for getting database container"); LOGGER.debug("request fda-container-managing at.tuwien.service for getting database container");
DatabaseContainer databaseContainer = webClientBuilder DatabaseContainer databaseContainer = webClientBuilder
.build() .build()
.get() .get()
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>fda-query-service</artifactId> <artifactId>fda-query-at.tuwien.service</artifactId>
<groupId>at.tuwien</groupId> <groupId>at.tuwien</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment