All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.adorsys.ledgers.rest.posting.controller.HealthController Maven / Gradle / Ivy

There is a newer version: 4.17
Show newest version
package de.adorsys.ledgers.rest.posting.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

@RestController
public class HealthController {
    private final Principal principal;

    public HealthController(Principal principal) {
        this.principal = principal;
    }

    @GetMapping("/greeting")
    public String greeting(@RequestParam(name = "name", required = false, defaultValue = "World") String name) {
        return "greeting " + name + " Principal=" + principal.getName();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy