本文整理匯總了Java中org.springframework.batch.admin.service.NoSuchStepExecutionException類的典型用法代碼示例。如果您正苦於以下問題:Java NoSuchStepExecutionException類的具體用法?Java NoSuchStepExecutionException怎麽用?Java NoSuchStepExecutionException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
NoSuchStepExecutionException類屬於org.springframework.batch.admin.service包,在下文中一共展示了NoSuchStepExecutionException類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onNotFoundException
import org.springframework.batch.admin.service.NoSuchStepExecutionException; //導入依賴的package包/類
/**
* Log the exception message at warn level and stack trace as trace level.
* Return response status HttpStatus.NOT_FOUND
*/
@ExceptionHandler({NoSuchAppRegistrationException.class,
NoSuchTaskDefinitionException.class,
NoSuchTaskExecutionException.class,
NoSuchJobExecutionException.class,
NoSuchJobInstanceException.class,
NoSuchJobException.class,
NoSuchStepExecutionException.class,
MetricsMvcEndpoint.NoSuchMetricException.class})
@ResponseStatus(HttpStatus.NOT_FOUND)
@ResponseBody
public VndErrors onNotFoundException(Exception e) {
String logref = logWarnLevelExceptionMessage(e);
if (logger.isTraceEnabled()) {
logTraceLevelStrackTrace(e);
}
String msg = getExceptionMessage(e);
return new VndErrors(logref, msg);
}
示例2: onNotFoundException
import org.springframework.batch.admin.service.NoSuchStepExecutionException; //導入依賴的package包/類
/**
* Log the exception message at warn level and stack trace as trace level. Return
* response status HttpStatus.NOT_FOUND
*
* @param e one of the exceptions, {@link NoSuchStreamDefinitionException},
* {@link NoSuchAppRegistrationException}, {@link NoSuchTaskDefinitionException},
* {@link NoSuchTaskExecutionException}, {@link NoSuchJobExecutionException},
* {@link NoSuchJobInstanceException}, {@link NoSuchJobException},
* {@link NoSuchStepExecutionException},
* {@link MetricsMvcEndpoint.NoSuchMetricException}, {@link NoSuchAppException}, or
* {@link NoSuchAppInstanceException}
* @return the error response in JSON format with media type
* application/vnd.error+json
*/
@ExceptionHandler({ NoSuchStreamDefinitionException.class, NoSuchAppRegistrationException.class,
NoSuchTaskDefinitionException.class, NoSuchTaskExecutionException.class, NoSuchJobExecutionException.class,
NoSuchJobInstanceException.class, NoSuchJobException.class, NoSuchStepExecutionException.class,
MetricsMvcEndpoint.NoSuchMetricException.class, NoSuchAppException.class,
NoSuchAppInstanceException.class, ApplicationDoesNotExistException.class })
@ResponseStatus(HttpStatus.NOT_FOUND)
@ResponseBody
public VndErrors onNotFoundException(Exception e) {
String logref = logWarnLevelExceptionMessage(e);
if (logger.isTraceEnabled()) {
logTraceLevelStrackTrace(e);
}
String msg = getExceptionMessage(e);
return new VndErrors(logref, msg);
}
示例3: getStepExecution
import org.springframework.batch.admin.service.NoSuchStepExecutionException; //導入依賴的package包/類
public StepExecution getStepExecution(Long jobExecutionId,
Long stepExecutionId) throws NoSuchJobExecutionException,
NoSuchStepExecutionException {
return simpleJobService.getStepExecution(jobExecutionId,
stepExecutionId);
}
示例4: getStepExecution
import org.springframework.batch.admin.service.NoSuchStepExecutionException; //導入依賴的package包/類
/**
* Retrieve a specific {@link StepExecutionResource}.
*
* @param id the {@link JobExecution} id.
* @param stepId the {@link StepExecution} id.
* @return Collection of {@link StepExecutionResource} for the given jobExecutionId.
* @throws NoSuchStepExecutionException if the stepId specified does not exist.
* @throws NoSuchJobExecutionException if the job execution for the id specified does
* not exist.
*/
@RequestMapping(value = { "/{stepExecutionId}" }, method = RequestMethod.GET)
@ResponseStatus(HttpStatus.OK)
public StepExecutionResource getStepExecution(@PathVariable("jobExecutionId") Long id,
@PathVariable("stepExecutionId") Long stepId)
throws NoSuchStepExecutionException, NoSuchJobExecutionException {
return stepAssembler.toResource(jobService.getStepExecution(id, stepId));
}