Newer
Older
sample-prometheus-actuator / src / main / java / com / sample / controller / SampleController.java
yhornisse on 29 Apr 2021 554 bytes add files
package com.sample.controller;

import lombok.Data;
import lombok.Builder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/sample")
public class SampleController {

    @GetMapping("/hello")
    public SampleDto hello() {
        return SampleDto.builder().msg("hello").build();
    }

    @Builder
    @Data
    private static class SampleDto {
        private String msg;
    }
}