From 3c901fef423ab9d09e74331fd04c6e4b4a0e53de Mon Sep 17 00:00:00 2001 From: Fabrizio Cucci Date: Fri, 22 Apr 2016 16:58:47 +0100 Subject: [PATCH 1/2] Removed redundant override of the configure method Since the `SampleJerseyApplication` class is already passed in the `SpringApplicationBuilder` constructor, there is no need to override the configure method of the `SpringBootServletInitializer` class. Closes gh-5773 --- .../src/main/java/sample/jersey/SampleJerseyApplication.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/spring-boot-samples/spring-boot-sample-jersey/src/main/java/sample/jersey/SampleJerseyApplication.java b/spring-boot-samples/spring-boot-sample-jersey/src/main/java/sample/jersey/SampleJerseyApplication.java index 7bd15a9915a..84fda6713dd 100644 --- a/spring-boot-samples/spring-boot-sample-jersey/src/main/java/sample/jersey/SampleJerseyApplication.java +++ b/spring-boot-samples/spring-boot-sample-jersey/src/main/java/sample/jersey/SampleJerseyApplication.java @@ -23,11 +23,6 @@ import org.springframework.boot.context.web.SpringBootServletInitializer; @SpringBootApplication public class SampleJerseyApplication extends SpringBootServletInitializer { - @Override - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - return application.sources(SampleJerseyApplication.class); - } - public static void main(String[] args) { new SampleJerseyApplication() .configure(new SpringApplicationBuilder(SampleJerseyApplication.class)) From f71a207a81116d2da8cff302899fc33101e84cdd Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Sat, 23 Apr 2016 16:15:17 +0200 Subject: [PATCH 2/2] Polish --- .../src/main/java/sample/jersey/Endpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-samples/spring-boot-sample-jersey/src/main/java/sample/jersey/Endpoint.java b/spring-boot-samples/spring-boot-sample-jersey/src/main/java/sample/jersey/Endpoint.java index fe22c619d8a..c18abd8623a 100644 --- a/spring-boot-samples/spring-boot-sample-jersey/src/main/java/sample/jersey/Endpoint.java +++ b/spring-boot-samples/spring-boot-sample-jersey/src/main/java/sample/jersey/Endpoint.java @@ -25,7 +25,7 @@ import org.springframework.stereotype.Component; @Path("/hello") public class Endpoint { - private Service service; + private final Service service; public Endpoint(Service service) { this.service = service;