@Component
@RequiredArgsConstructor
public class ThankingService {
private final Translator translator;
public String produce() {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Childcare Leave Calculator | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Calculate and display Childcare Leave duration and total | |
// @author You | |
// @match *://our-leave.thoughtworks.net/* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping("/filter") | |
public class FilterController { | |
@GetMapping | |
public ResponseEntity findAll(EventFilterDTO filter) { | |
List<Result> result = filterService.findAll(filter); | |
return ResponseEntity.ok(result); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CallableUtil { | |
public static Object extractCallable(FutureTask<?> futureTask) { | |
try { | |
Field callableField = futureTask.getClass().getDeclaredField("callable"); | |
callableField.setAccessible(true); | |
Object callable = callableField.get(futureTask); | |
if (callable.getClass().getSimpleName().equals("RunnableAdapter")) { | |
Field taskField = callable.getClass().getDeclaredField("task"); | |
taskField.setAccessible(true); |