You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (runningTaskMap.containsKey(task) && runningTaskMap.get(task).equals(TaskStatus.RUNNING)) {
throw new OnlineTaskException("This task is running");
}
2.下面这个方法同样的问题。
@AfterReturning(returning = "result", pointcut = "serviceStatistics(onlineTask)")
public void afterReturning(JoinPoint joinPoint, OnlineTask onlineTask, Object result)
if (runningTaskMap.get(task).equals(TaskStatus.RUNNING))
3.同样的问题。 @before(value = "serviceStatistics(onlineTask)")
public void deBefore(JoinPoint joinPoint, OnlineTask onlineTask) throws Throwable {
if (runningTaskMap.containsKey(task) && runningTaskMap.get(task).equals(TaskStatus.RUNNING)) {
throw new OnlineTaskException("This task is running");
}
4. 下面这个方法既然后面用横线截取字符串,那就是要求application name必须带中划线(-)记得文档里面写清楚啊,这里会报字符串数组越界异常的,如果application name里面没有中划线。
/**
* @param request
* @return
*/
public Map<String, String> builtMqMessage(HttpServletRequest request) {
这个方法里面从runningTaskMap读取不到数据的时候会空指针异常
@before(value = "serviceStatistics(onlineTask)")
public void deBefore(JoinPoint joinPoint, OnlineTask onlineTask) throws Throwable
if (runningTaskMap.containsKey(task) && runningTaskMap.get(task).equals(TaskStatus.RUNNING)) {
throw new OnlineTaskException("This task is running");
}
2.下面这个方法同样的问题。
@AfterReturning(returning = "result", pointcut = "serviceStatistics(onlineTask)")
public void afterReturning(JoinPoint joinPoint, OnlineTask onlineTask, Object result)
if (runningTaskMap.get(task).equals(TaskStatus.RUNNING))
3.同样的问题。
@before(value = "serviceStatistics(onlineTask)")
public void deBefore(JoinPoint joinPoint, OnlineTask onlineTask) throws Throwable {
if (runningTaskMap.containsKey(task) && runningTaskMap.get(task).equals(TaskStatus.RUNNING)) {
throw new OnlineTaskException("This task is running");
}
4. 下面这个方法既然后面用横线截取字符串,那就是要求application name必须带中划线(-)记得文档里面写清楚啊,这里会报字符串数组越界异常的,如果application name里面没有中划线。
/**
* @param request
* @return
*/
public Map<String, String> builtMqMessage(HttpServletRequest request) {
The text was updated successfully, but these errors were encountered: