[Trunk | Admin Tools]: AdminToolsCheckDeployController.java: [NEW] Controller added and "hello()" method (@RequestMapping(value = "", method = RequestMethod.GET)) which just prints and returns a greeting message.

This commit is contained in:
Konstantina Galouni 2021-03-24 10:27:57 +00:00
parent 0f14a41d6f
commit c4f63e0d78
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
package eu.dnetlib.uoaadmintools.controllers;
import org.apache.log4j.Logger;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
@CrossOrigin(origins = "*")
public class AdminToolsCheckDeployController {
private final Logger log = Logger.getLogger(this.getClass());
@RequestMapping(value = "", method = RequestMethod.GET)
public String hello() {
log.debug("Hello from uoa-admin-tools!");
return "Hello from uoa-admin-tools!";
}
}