Skip to content

Commit

Permalink
Update to the Latest software
Browse files Browse the repository at this point in the history
	- Updating springdoc to v1.6.7.
	- Updating lombok to v1.18.22.
	- Updating maven-compiler-plugin to v3.10.1.
	- Exclude Spring JPA - hibernate-core v5.6.7 and use v5.6.5. due to bug with H2 database.
	- Add swagger API version as project version.
	- Remove plugin-management section from pom.xml and add plugins to plugins tag.
	- Update README.md to reflect changes of FS v2.8.
  • Loading branch information
mohamed-taman committed Apr 10, 2022
2 parents faf2f9d + b12ceaf commit 7f48482
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 54 deletions.
2 changes: 1 addition & 1 deletion README.md

Large diffs are not rendered by default.

107 changes: 58 additions & 49 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.0-M2</version>
<version>2.7.0-M3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<groupId>org.siriusxi.htec</groupId>
<artifactId>flight-advisor</artifactId>
<version>2.5</version>
<version>2.8</version>
<name>Flight Advisor API</name>
<description>Flight Advisor API Spring Boot based Application.</description>
<packaging>jar</packaging>
Expand Down Expand Up @@ -66,9 +66,9 @@
<maven.surefire.plugin.version>3.0.0-M5</maven.surefire.plugin.version>
<maven.failsafe.plugin.version>3.0.0-M5</maven.failsafe.plugin.version>
<io.jsonwebtoken.version>0.11.2</io.jsonwebtoken.version>
<org.mapstruct.version>1.4.2.Final</org.mapstruct.version>
<org.springdoc.version>1.6.6</org.springdoc.version>
<lombok.version>1.18.20</lombok.version>
<org.mapstruct.version>1.5.0.RC1</org.mapstruct.version>
<org.springdoc.version>1.6.7</org.springdoc.version>
<lombok.version>1.18.22</lombok.version>
<opencsv.version>5.6</opencsv.version>
<hipster-core.version>1.0.1</hipster-core.version>
<datasource-proxy-sbs.version>1.8.0</datasource-proxy-sbs.version>
Expand All @@ -88,6 +88,18 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.6.5.Final</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -231,9 +243,9 @@
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>

<!-- Add hipster-core instead of hipster-all for basic functionality. -->
Expand Down Expand Up @@ -286,48 +298,45 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>${java.version}</release>
<enablePreview>true</enablePreview>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<argLine>--enable-preview</argLine>
<includes>
<include>**/*Tests.java</include>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven.failsafe.plugin.version}</version>
<configuration>
<argLine>--enable-preview</argLine>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${java.version}</release>
<compilerArgs>--enable-preview</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<argLine>--enable-preview</argLine>
<includes>
<include>**/*Tests.java</include>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven.failsafe.plugin.version}</version>
<configuration>
<argLine>--enable-preview</argLine>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

<repositories>
Expand Down
12 changes: 9 additions & 3 deletions src/main/java/org/siriusxi/htec/fa/api/FileUploadController.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,17 @@
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.security.RolesAllowed;
import java.io.*;
import java.nio.file.Files;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.List;

import static org.springframework.http.HttpStatus.*;
import static org.springframework.http.HttpStatus.BAD_REQUEST;
import static org.springframework.http.HttpStatus.EXPECTATION_FAILED;
import static org.springframework.http.HttpStatus.FAILED_DEPENDENCY;
import static org.springframework.http.HttpStatus.OK;

/**
* Files Upload controller used to handle all data feeding the system like airports and routes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@Table(catalog = "FLIGHTDB", schema = "PUBLIC")
@Getter
@Setter
@ToString
@NoArgsConstructor
@RequiredArgsConstructor
public class Country implements Serializable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public OpenAPI customOpenAPI() {
.bearerFormat("JWT")))
.info(new Info()
.title("REST API for Flight Advisor Service.")
.version("1.0")
.version("2.8")
.license(new License()
.name("MIT License")
.url("https://springdoc.org")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.util.List;
import java.util.Optional;

// FIXME Cache is not working properly
@Repository
@CacheConfig(cacheNames = "cities")
public interface CityRepository extends CrudRepository<City, Integer> {
Expand Down

0 comments on commit 7f48482

Please sign in to comment.