Skip to content

Commit 7f48482

Browse files
committed
Update to the Latest software
- 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.
2 parents faf2f9d + b12ceaf commit 7f48482

File tree

6 files changed

+71
-54
lines changed

6 files changed

+71
-54
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pom.xml

Lines changed: 58 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<parent>
77
<groupId>org.springframework.boot</groupId>
88
<artifactId>spring-boot-starter-parent</artifactId>
9-
<version>2.7.0-M2</version>
9+
<version>2.7.0-M3</version>
1010
<relativePath/> <!-- lookup parent from repository -->
1111
</parent>
1212

1313
<groupId>org.siriusxi.htec</groupId>
1414
<artifactId>flight-advisor</artifactId>
15-
<version>2.5</version>
15+
<version>2.8</version>
1616
<name>Flight Advisor API</name>
1717
<description>Flight Advisor API Spring Boot based Application.</description>
1818
<packaging>jar</packaging>
@@ -66,9 +66,9 @@
6666
<maven.surefire.plugin.version>3.0.0-M5</maven.surefire.plugin.version>
6767
<maven.failsafe.plugin.version>3.0.0-M5</maven.failsafe.plugin.version>
6868
<io.jsonwebtoken.version>0.11.2</io.jsonwebtoken.version>
69-
<org.mapstruct.version>1.4.2.Final</org.mapstruct.version>
70-
<org.springdoc.version>1.6.6</org.springdoc.version>
71-
<lombok.version>1.18.20</lombok.version>
69+
<org.mapstruct.version>1.5.0.RC1</org.mapstruct.version>
70+
<org.springdoc.version>1.6.7</org.springdoc.version>
71+
<lombok.version>1.18.22</lombok.version>
7272
<opencsv.version>5.6</opencsv.version>
7373
<hipster-core.version>1.0.1</hipster-core.version>
7474
<datasource-proxy-sbs.version>1.8.0</datasource-proxy-sbs.version>
@@ -88,6 +88,18 @@
8888
<dependency>
8989
<groupId>org.springframework.boot</groupId>
9090
<artifactId>spring-boot-starter-data-jpa</artifactId>
91+
<exclusions>
92+
<exclusion>
93+
<groupId>org.hibernate</groupId>
94+
<artifactId>hibernate-core</artifactId>
95+
</exclusion>
96+
</exclusions>
97+
</dependency>
98+
99+
<dependency>
100+
<groupId>org.hibernate</groupId>
101+
<artifactId>hibernate-core</artifactId>
102+
<version>5.6.5.Final</version>
91103
</dependency>
92104

93105
<dependency>
@@ -231,9 +243,9 @@
231243
</dependency>
232244

233245
<dependency>
234-
<groupId>commons-io</groupId>
235-
<artifactId>commons-io</artifactId>
236-
<version>${commons-io.version}</version>
246+
<groupId>commons-io</groupId>
247+
<artifactId>commons-io</artifactId>
248+
<version>${commons-io.version}</version>
237249
</dependency>
238250

239251
<!-- Add hipster-core instead of hipster-all for basic functionality. -->
@@ -286,48 +298,45 @@
286298
</execution>
287299
</executions>
288300
</plugin>
301+
<plugin>
302+
<artifactId>maven-compiler-plugin</artifactId>
303+
<version>${maven-compiler-plugin.version}</version>
304+
<configuration>
305+
<release>${java.version}</release>
306+
<enablePreview>true</enablePreview>
307+
<annotationProcessorPaths>
308+
<path>
309+
<groupId>org.projectlombok</groupId>
310+
<artifactId>lombok</artifactId>
311+
<version>${lombok.version}</version>
312+
</path>
313+
<path>
314+
<groupId>org.mapstruct</groupId>
315+
<artifactId>mapstruct-processor</artifactId>
316+
<version>${org.mapstruct.version}</version>
317+
</path>
318+
</annotationProcessorPaths>
319+
</configuration>
320+
</plugin>
321+
<plugin>
322+
<artifactId>maven-surefire-plugin</artifactId>
323+
<version>${maven.surefire.plugin.version}</version>
324+
<configuration>
325+
<argLine>--enable-preview</argLine>
326+
<includes>
327+
<include>**/*Tests.java</include>
328+
<include>**/*Test.java</include>
329+
</includes>
330+
</configuration>
331+
</plugin>
332+
<plugin>
333+
<artifactId>maven-failsafe-plugin</artifactId>
334+
<version>${maven.failsafe.plugin.version}</version>
335+
<configuration>
336+
<argLine>--enable-preview</argLine>
337+
</configuration>
338+
</plugin>
289339
</plugins>
290-
<pluginManagement>
291-
<plugins>
292-
<plugin>
293-
<artifactId>maven-compiler-plugin</artifactId>
294-
<configuration>
295-
<release>${java.version}</release>
296-
<compilerArgs>--enable-preview</compilerArgs>
297-
<annotationProcessorPaths>
298-
<path>
299-
<groupId>org.projectlombok</groupId>
300-
<artifactId>lombok</artifactId>
301-
<version>${lombok.version}</version>
302-
</path>
303-
<path>
304-
<groupId>org.mapstruct</groupId>
305-
<artifactId>mapstruct-processor</artifactId>
306-
<version>${org.mapstruct.version}</version>
307-
</path>
308-
</annotationProcessorPaths>
309-
</configuration>
310-
</plugin>
311-
<plugin>
312-
<artifactId>maven-surefire-plugin</artifactId>
313-
<version>${maven.surefire.plugin.version}</version>
314-
<configuration>
315-
<argLine>--enable-preview</argLine>
316-
<includes>
317-
<include>**/*Tests.java</include>
318-
<include>**/*Test.java</include>
319-
</includes>
320-
</configuration>
321-
</plugin>
322-
<plugin>
323-
<artifactId>maven-failsafe-plugin</artifactId>
324-
<version>${maven.failsafe.plugin.version}</version>
325-
<configuration>
326-
<argLine>--enable-preview</argLine>
327-
</configuration>
328-
</plugin>
329-
</plugins>
330-
</pluginManagement>
331340
</build>
332341

333342
<repositories>

src/main/java/org/siriusxi/htec/fa/api/FileUploadController.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,17 @@
3232
import org.springframework.web.multipart.MultipartFile;
3333

3434
import javax.annotation.security.RolesAllowed;
35-
import java.io.*;
36-
import java.nio.file.Files;
35+
import java.io.BufferedReader;
36+
import java.io.IOException;
37+
import java.io.InputStream;
38+
import java.io.InputStreamReader;
39+
import java.io.Reader;
3740
import java.util.List;
3841

39-
import static org.springframework.http.HttpStatus.*;
42+
import static org.springframework.http.HttpStatus.BAD_REQUEST;
43+
import static org.springframework.http.HttpStatus.EXPECTATION_FAILED;
44+
import static org.springframework.http.HttpStatus.FAILED_DEPENDENCY;
45+
import static org.springframework.http.HttpStatus.OK;
4046

4147
/**
4248
* Files Upload controller used to handle all data feeding the system like airports and routes.

src/main/java/org/siriusxi/htec/fa/domain/model/Country.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
@Table(catalog = "FLIGHTDB", schema = "PUBLIC")
2121
@Getter
2222
@Setter
23+
@ToString
2324
@NoArgsConstructor
2425
@RequiredArgsConstructor
2526
public class Country implements Serializable {

src/main/java/org/siriusxi/htec/fa/infra/config/SwaggerConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public OpenAPI customOpenAPI() {
2222
.bearerFormat("JWT")))
2323
.info(new Info()
2424
.title("REST API for Flight Advisor Service.")
25-
.version("1.0")
25+
.version("2.8")
2626
.license(new License()
2727
.name("MIT License")
2828
.url("https://springdoc.org")));

src/main/java/org/siriusxi/htec/fa/repository/CityRepository.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import java.util.List;
1111
import java.util.Optional;
1212

13+
// FIXME Cache is not working properly
1314
@Repository
1415
@CacheConfig(cacheNames = "cities")
1516
public interface CityRepository extends CrudRepository<City, Integer> {

0 commit comments

Comments
 (0)