本文整理汇总了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));
}