Skip to content

Instantly share code, notes, and snippets.

@nuboat
Last active March 27, 2020 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuboat/a4c5c1c2eecb0c8e90f0f607ea6b2c8d to your computer and use it in GitHub Desktop.
Save nuboat/a4c5c1c2eecb0c8e90f0f607ea6b2c8d to your computer and use it in GitHub Desktop.
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
@RestController
class AM {
private final Map<String, String> store;
AM() {
store = Map.of("123", "นบ.", "124", "บน.");
}
@GetMapping(value = "/verify/{token}")
private String verify(@PathVariable("token") final String token) {
log.info("Authoen by {}", token);
return store.getOrDefault("token", null);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment