Skip to content

Commit 720249f

Browse files
committed
Bump maven compiler source and target versions to 17 and updated logger
1 parent e55fced commit 720249f

File tree

6 files changed

+52
-16
lines changed

6 files changed

+52
-16
lines changed

pom.xml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<properties>
1919
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2020
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
21-
<maven.compiler.source>8</maven.compiler.source>
22-
<maven.compiler.target>8</maven.compiler.target>
21+
<maven.compiler.source>17</maven.compiler.source>
22+
<maven.compiler.target>17</maven.compiler.target>
2323
<swagger.version>3.0.0</swagger.version>
2424
<springweb.version>3.0.0</springweb.version>
2525
<couchbase.version>3.7.0</couchbase.version>
@@ -28,6 +28,10 @@
2828
</properties>
2929

3030
<dependencies>
31+
<dependency>
32+
<groupId>org.springframework.boot</groupId>
33+
<artifactId>spring-boot-starter-logging</artifactId>
34+
</dependency>
3135
<dependency>
3236
<groupId>org.springframework</groupId>
3337
<artifactId>spring-tx</artifactId>
@@ -104,6 +108,22 @@
104108
<build>
105109
<finalName>java-springboot-quickstart</finalName>
106110
<plugins>
111+
<plugin>
112+
<groupId>org.apache.maven.plugins</groupId>
113+
<artifactId>maven-compiler-plugin</artifactId>
114+
<version>3.13.0</version>
115+
<configuration>
116+
<source>${maven.compiler.source}</source>
117+
<target>${maven.compiler.target}</target>
118+
<annotationProcessorPaths>
119+
<path>
120+
<groupId>org.projectlombok</groupId>
121+
<artifactId>lombok</artifactId>
122+
<version>1.18.34</version>
123+
</path>
124+
</annotationProcessorPaths>
125+
</configuration>
126+
</plugin>
107127
<plugin>
108128
<groupId>org.apache.maven.plugins</groupId>
109129
<artifactId>maven-surefire-plugin</artifactId>
@@ -117,6 +137,14 @@
117137
<plugin>
118138
<groupId>org.springframework.boot</groupId>
119139
<artifactId>spring-boot-maven-plugin</artifactId>
140+
<configuration>
141+
<excludes>
142+
<exclude>
143+
<groupId>org.projectlombok</groupId>
144+
<artifactId>lombok</artifactId>
145+
</exclude>
146+
</excludes>
147+
</configuration>
120148
<executions>
121149
<execution>
122150
<id>pre-integration-test</id>

src/main/java/org/couchbase/quickstart/springboot/Application.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
package org.couchbase.quickstart.springboot;
22

3+
import org.slf4j.Logger;
4+
import org.slf4j.LoggerFactory;
35
import org.springframework.boot.CommandLineRunner;
46
import org.springframework.boot.SpringApplication;
57
import org.springframework.boot.autoconfigure.SpringBootApplication;
68
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
79

8-
import lombok.extern.slf4j.Slf4j;
9-
10-
@Slf4j
1110
@SpringBootApplication(exclude = SecurityAutoConfiguration.class, proxyBeanMethods = false)
1211
public class Application implements CommandLineRunner {
1312

13+
private static final Logger log = LoggerFactory.getLogger(Application.class);
14+
1415
public static void main(String[] args) {
1516
SpringApplication.run(Application.class, args);
1617
}

src/main/java/org/couchbase/quickstart/springboot/configs/CouchbaseConfig.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.time.Duration;
44

5+
import org.slf4j.Logger;
6+
import org.slf4j.LoggerFactory;
57
import org.springframework.beans.factory.annotation.Value;
68
import org.springframework.context.annotation.Bean;
79
import org.springframework.context.annotation.Configuration;
@@ -12,12 +14,13 @@
1214
import com.couchbase.client.java.Cluster;
1315

1416
import lombok.Getter;
15-
import lombok.extern.slf4j.Slf4j;
17+
1618
@Configuration
17-
@Slf4j
1819
@Getter
1920
public class CouchbaseConfig {
2021

22+
private static final Logger log = LoggerFactory.getLogger(CouchbaseConfig.class);
23+
2124
@Value("#{systemEnvironment['DB_CONN_STR'] ?: '${spring.couchbase.bootstrap-hosts:localhost}'}")
2225
private String host;
2326

src/main/java/org/couchbase/quickstart/springboot/controllers/AirlineController.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import org.couchbase.quickstart.springboot.models.Airline;
66
import org.couchbase.quickstart.springboot.services.AirlineService;
7+
import org.slf4j.Logger;
8+
import org.slf4j.LoggerFactory;
79
import org.springframework.http.HttpStatus;
810
import org.springframework.http.ResponseEntity;
911
import org.springframework.web.bind.annotation.DeleteMapping;
@@ -24,13 +26,13 @@
2426
import io.swagger.v3.oas.annotations.responses.ApiResponse;
2527
import io.swagger.v3.oas.annotations.responses.ApiResponses;
2628
import jakarta.validation.Valid;
27-
import lombok.extern.slf4j.Slf4j;
2829

2930
@RestController
3031
@RequestMapping("/api/v1/airline")
31-
@Slf4j
3232
public class AirlineController {
3333

34+
private static final Logger log = LoggerFactory.getLogger(AirlineController.class);
35+
3436
private final AirlineService airlineService;
3537

3638
public AirlineController(AirlineService airlineService) {

src/main/java/org/couchbase/quickstart/springboot/controllers/AirportController.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import org.couchbase.quickstart.springboot.models.Airport;
77
import org.couchbase.quickstart.springboot.models.Route;
88
import org.couchbase.quickstart.springboot.services.AirportService;
9+
import org.slf4j.Logger;
10+
import org.slf4j.LoggerFactory;
911
import org.springframework.http.HttpStatus;
1012
import org.springframework.http.ResponseEntity;
1113
import org.springframework.web.bind.annotation.DeleteMapping;
@@ -26,13 +28,13 @@
2628
import io.swagger.v3.oas.annotations.responses.ApiResponse;
2729
import io.swagger.v3.oas.annotations.responses.ApiResponses;
2830
import jakarta.validation.Valid;
29-
import lombok.extern.slf4j.Slf4j;
3031

3132
@RestController
3233
@RequestMapping("/api/v1/airport")
33-
@Slf4j
3434
public class AirportController {
3535

36+
private static final Logger log = LoggerFactory.getLogger(AirportController.class);
37+
3638
private final AirportService airportService;
3739

3840
public AirportController(AirportService airportService) {
@@ -181,5 +183,4 @@ public ResponseEntity<List<String>> listDirectConnections(@RequestParam(required
181183
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
182184
}
183185
}
184-
185-
}
186+
}

src/main/java/org/couchbase/quickstart/springboot/controllers/RouteController.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import org.couchbase.quickstart.springboot.models.Route;
66
import org.couchbase.quickstart.springboot.services.RouteService;
7+
import org.slf4j.Logger;
8+
import org.slf4j.LoggerFactory;
79
import org.springframework.http.HttpStatus;
810
import org.springframework.http.ResponseEntity;
911
import org.springframework.web.bind.annotation.DeleteMapping;
@@ -24,13 +26,13 @@
2426
import io.swagger.v3.oas.annotations.responses.ApiResponse;
2527
import io.swagger.v3.oas.annotations.responses.ApiResponses;
2628
import jakarta.validation.Valid;
27-
import lombok.extern.slf4j.Slf4j;
2829

2930
@RestController
3031
@RequestMapping("/api/v1/route")
31-
@Slf4j
3232
public class RouteController {
3333

34+
private static final Logger log = LoggerFactory.getLogger(RouteController.class);
35+
3436
private final RouteService routeService;
3537

3638
public RouteController(RouteService routeService) {
@@ -157,5 +159,4 @@ public ResponseEntity<List<Route>> listRoutes(
157159
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
158160
}
159161
}
160-
161162
}

0 commit comments

Comments
 (0)