Skip to content
Snippets Groups Projects
Commit 3c415435 authored by Ján Macháček's avatar Ján Macháček
Browse files

feat: add server settings

parent f5aa68e2
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ servers:
server:
default: localhost
port:
default: "8085"
default: "8080"
tags:
- name: Report
description: Microservice for report pdf report.
......
......@@ -9,22 +9,75 @@
</parent>
<artifactId>report</artifactId>
<packaging>jar</packaging>
<name>report</name>
<description>Reporting service for Airport Manager</description>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-models-jakarta</artifactId>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations-jakarta</artifactId>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
</dependency>
<!-- for pagination from JPA without actually using JPA -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<!-- for testing -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
......@@ -33,11 +86,54 @@
</dependencies>
<build>
<defaultGoal>spring-boot:run</defaultGoal>
<!-- name of executable JAR file -->
<finalName>report_generated</finalName>
<plugins>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<!-- take openapi.yaml from the corresponding microservice -->
<inputSpec>${project.basedir}/openapi.yaml</inputSpec>
<generatorName>spring</generatorName>
<apiPackage>cz.muni.fi.pa165.report.server.api</apiPackage>
<modelPackage>cz.muni.fi.pa165.report.server.model</modelPackage>
<!-- https://openapi-generator.tech/docs/generators/spring -->
<configOptions>
<basePackage>cz.muni.fi.pa165.report.server</basePackage>
<configPackage>cz.muni.fi.pa165.report.server.config</configPackage>
<useSpringBoot3>true</useSpringBoot3>
<useTags>true</useTags>
<delegatePattern>true</delegatePattern>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<!-- create executable jar -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>
<!-- run integration tests in "mvn verify" phase -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
package cz.muni.fi.pa165.report;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ReportApplication {
public static void main(String[] args) {
SpringApplication.run(ReportApplication.class, args);
}
}
package cz.muni.fi.pa165.report.server;
public class ReportController {
public static void main(String[] args) {
System.out.println("Hello there!");
}
}
package cz.muni.fi.pa165.report;
package cz.muni.fi.pa165.report.server;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment