私はいくつかの特定の問題に直面しました: 休憩コントローラが何時間か働いています。それは応答しません。ブラウザの読み込みプロセスは、しばらくの間、応答を待っています。もし私がPOSTerでリクエストを送ると、そのリクエストはコントローラに送られたが、レスポンスは受信されていないことがわかります。私はアプリをデバッグしようとしました、私はいくつかの処理がスケジュールされている - 彼らは働いています。しかし、コントローラではありません。リクエストがコントローラに届かない。それは前に立ち往生した。これがどこで起こっているのか、私はどのように知ることができますか?ありがとうございました。Spring MVCコントローラが固まって応答していない
@RestController
@RequestMapping("/quotes")
public class QuotesController {
private final QuotesService quotesService;
@Autowired
public QuotesController(QuotesService quotesService) {
this.quotesService = quotesService;
}
@RequestMapping(value="", method= RequestMethod.GET, produces = "application/json; charset=utf-8")
public ResponseEntity<List<LoadedFileInfo>> getLoadedFilesData(){
List<LoadedFileInfo> result = quotesService.getLoadedFilesData();
return new ResponseEntity<List<LoadedFileInfo>>(result, HttpStatus.OK);
}
@RequestMapping(value="/currencyPairs", method= RequestMethod.GET, produces = "application/json; charset=utf-8")
public ResponseEntity<List<CurrencyPair>> getCurrencyPairs(){
return new ResponseEntity<List<CurrencyPair>>(quotesService.getCurrencyPairs(), HttpStatus.OK);
}
@RequestMapping(value="/oneMinute", method= RequestMethod.GET, produces = "application/json; charset=utf-8")
public ResponseEntity<List<Number[]>> getOneMinuteQuotes(@RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime from, @RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime to, @RequestParam Integer currencyPair){
return new ResponseEntity<List<Number[]>>(quotesService.getOneMinuteQuotes(from, to, currencyPair), HttpStatus.OK);
}
@RequestMapping(value="/fiveMinutes", method= RequestMethod.GET, produces = "application/json; charset=utf-8")
public ResponseEntity<List<Number[]>> getFiveMinutesQuotes(@RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime from, @RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime to, @RequestParam Integer currencyPair){
return new ResponseEntity<List<Number[]>>(quotesService.getFiveMinuteQuotes(from, to, currencyPair), HttpStatus.OK);
}
@RequestMapping(value="/fifteenMinutes", method= RequestMethod.GET, produces = "application/json; charset=utf-8")
public ResponseEntity<List<Number[]>> getFifteenMinutesQuotes(@RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime from, @RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime to, @RequestParam Integer currencyPair){
return new ResponseEntity<List<Number[]>>(quotesService.getFifteenMinuteQuotes(from, to, currencyPair), HttpStatus.OK);
}
@RequestMapping(value="/thirtyMinutes", method= RequestMethod.GET, produces = "application/json; charset=utf-8")
public ResponseEntity<List<Number[]>> getThirtyMinutesQuotes(@RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime from, @RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime to, @RequestParam Integer currencyPair){
return new ResponseEntity<List<Number[]>>(quotesService.getThirtyMinuteQuotes(from, to, currencyPair), HttpStatus.OK);
}
@RequestMapping(value="/oneHour", method= RequestMethod.GET, produces = "application/json; charset=utf-8")
public ResponseEntity<List<Number[]>> getOneHourQuotes(@RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime from, @RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime to, @RequestParam Integer currencyPair){
return new ResponseEntity<List<Number[]>>(quotesService.getOneHourQuotes(from, to, currencyPair), HttpStatus.OK);
}
@RequestMapping(value="/fourHours", method= RequestMethod.GET, produces = "application/json; charset=utf-8")
public ResponseEntity<List<Number[]>> getFourHourQuotes(@RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime from, @RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime to, @RequestParam Integer currencyPair){
return new ResponseEntity<List<Number[]>>(quotesService.getFourHourQuotes(from, to, currencyPair), HttpStatus.OK);
}
@RequestMapping(value="/oneDay", method= RequestMethod.GET, produces = "application/json; charset=utf-8")
public ResponseEntity<List<Number[]>> getOneDayQuotes(@RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime from, @RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime to, @RequestParam Integer currencyPair){
return new ResponseEntity<List<Number[]>>(quotesService.getOneDayQuotes(from, to, currencyPair), HttpStatus.OK);
}
@RequestMapping(value="/oneWeek", method= RequestMethod.GET, produces = "application/json; charset=utf-8")
public ResponseEntity<List<Number[]>> getOneWeekQuotes(@RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime from, @RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime to, @RequestParam Integer currencyPair){
return new ResponseEntity<List<Number[]>>(quotesService.getOneWeekQuotes(from, to, currencyPair), HttpStatus.OK);
}
@RequestMapping(value="/oneMonth", method= RequestMethod.GET, produces = "application/json; charset=utf-8")
public ResponseEntity<List<Number[]>> getOneMonthQuotes(@RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime from, @RequestParam @DateTimeFormat(iso= DateTimeFormat.ISO.DATE_TIME) LocalDateTime to, @RequestParam Integer currencyPair){
return new ResponseEntity<List<Number[]>>(quotesService.getOneMonthQuotes(from, to, currencyPair), HttpStatus.OK);
}
}
ことがあるか、一つだけを助けることができると仮定してきたように、分析のいずれかのタイプを試していないので、?ログにエラーがありますか?あなたはスレッドダンプを試みましたか?あなたはそれにvisualVMを接続しましたか?どのアプリケーションサーバーですか? –
これはSpringBootです。私にはコントローラが1つしかありません。ログにエラーはありません。スレッドダンプを試していないし、visualVMに接続していない – migAlex
REST用に作成したコントローラコードを投稿できますか? – srinivas