Newer
Older
SampleSpringSecurity3 / src / main / java / com / sample / controller / SampleApiController.java
yhornisse on 30 May 2023 598 bytes init
package com.sample.controller;

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


@Slf4j
@RestController
@RequestMapping("/sample")
public class SampleApiController {

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

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