@PostMapping(value = "/some_path",
consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE)
public Data post(@RequestBody Data data) {
return data;
}
@echo off
REM для https://qna.habr.com/q/1027240
set C=%~nx0
if NOT "%DEBUG%" equ "" echo Running with DEBUG set
REM using two environment parameters: C and DEBUG
REM NOTE: passing arguments appears tricky when
REM powershell run with command built inline as string
@powershell.exe -ExecutionPolicy Bypass -Command "$debug=$env:DEBUG;$s=(get-content \"%~f0\") -join \"`n\"; $s = $s.substring($s.IndexOf(\"goto :\"+\"EOF\")+9);if ($debug -ne $null){write-output (\"Running:`n{0}\" -f$s);} invoke-expression -command $s"
@goto :EOF
# powershell code
start-sleep 5
write-output ( 'Calling script: {0}' -f $env:C)
pause
exit 0
c:\Users\sergueik\Desktop>set debug=1
c:\Users\sergueik\Desktop>show_caller.cmd
Running with DEBUG set
Running:
Start-Sleep 5
write-output ( 'Calling script: {0}' -f $env:C)
pause
exit 0
Calling script: show_caller.cmd
Press Enter to continue...: