-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from wcmc-its/dev
Upgrade to Java 11 and swagger 3.0
- Loading branch information
Showing
13 changed files
with
83 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM openjdk:8-jre-slim | ||
FROM openjdk:11-jre-slim | ||
|
||
RUN mkdir -p /app | ||
WORKDIR /app | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
web: java -jar reciter-scopus-retrieval-tool-0.0.1-SNAPSHOT.jar | ||
web: java -jar reciter-scopus-retrieval-tool-1.1.0.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package reciter.controller; | ||
|
||
import io.swagger.annotations.Api; | ||
import io.swagger.annotations.ApiOperation; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
import org.springframework.web.bind.annotation.ResponseBody; | ||
|
||
@Controller | ||
@RequestMapping("/scopus") | ||
@Api(value = "PingController", tags = {"Health Check"}) | ||
public class PingController { | ||
|
||
@ApiOperation(value = "Health check", response = ResponseEntity.class) | ||
@GetMapping(value = "/ping", produces = "text/plain") | ||
@ResponseBody | ||
public ResponseEntity<String> ping() { | ||
return ResponseEntity.ok("Healthy"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,11 @@ | |
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import springfox.documentation.builders.ApiInfoBuilder; | ||
import springfox.documentation.builders.RequestHandlerSelectors; | ||
import springfox.documentation.service.ApiInfo; | ||
import springfox.documentation.service.Contact; | ||
import springfox.documentation.spi.DocumentationType; | ||
import springfox.documentation.spring.web.plugins.Docket; | ||
import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
|
@@ -18,6 +22,18 @@ public Docket productApi() { | |
.select() | ||
.apis(RequestHandlerSelectors.basePackage("reciter.controller")) | ||
.paths(regex("/scopus.*")) | ||
.build() | ||
.apiInfo(apiInfo()); | ||
} | ||
|
||
private ApiInfo apiInfo() { | ||
return new ApiInfoBuilder().title("ReCiter publication management system - Scopus Retrieval Tool") | ||
.description("Retrieve publications from Scopus. More info here: http://github.com/wcmc-its/ReCiter-Scopus-Retrieval-Tool/").termsOfServiceUrl("") | ||
.contact(new Contact("Paul J. Albert", "https://github.com/wcmc-its/ReCiter", "[email protected]")) | ||
.contact(new Contact("Sarbajit Dutta", "https://github.com/wcmc-its/ReCiter", "[email protected]")) | ||
.license("Apache License Version 2.0") | ||
.licenseUrl("https://www.apache.org/licenses/LICENSE-2.0") | ||
.version("1.1.0") | ||
.build(); | ||
} | ||
} |