Skip to content

Instantly share code, notes, and snippets.

View nuboat's full-sized avatar

Peerapat CC nuboat

View GitHub Profile
package link.colon.component;
import org.springframework.stereotype.Component;
@Component
public class HelloWorld {
public String sayHi() { return "Hello World”; }
}
package link.colon.component;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class HelloWorldTest {
@Autowired
@nuboat
nuboat / AM.java
Last active March 27, 2020 08:06
package link.colon.controller;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@Slf4j
package link.colon.controller;
import link.colon.authorize.AccessCRUD;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import java.util.Optional;
@nuboat
nuboat / Profiler.java
Created October 7, 2020 11:18
Java Profiler
/*
* Copyright (C) 2018 Be ID Corporation Co., Ltd. <https://www.beid.io>
*/
package handlers;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
package cc.peerapat;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;
import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPResponse;
import java.util.HashMap;
import java.util.Map;