修改前端部署路径
parent
b5695494c2
commit
d5997c4dc0
|
@ -1,19 +1,25 @@
|
||||||
package cn.iocoder.yudao.adminserver.modules.infra.controller.job;
|
package cn.iocoder.yudao.adminserver.modules.infra.controller.job;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.*;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.infra.convert.job.InfJobConvert;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.infra.service.job.InfJobService;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||||
import cn.iocoder.yudao.framework.quartz.core.util.CronUtils;
|
import cn.iocoder.yudao.framework.quartz.core.util.CronUtils;
|
||||||
import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.*;
|
|
||||||
import cn.iocoder.yudao.adminserver.modules.infra.convert.job.InfJobConvert;
|
|
||||||
import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO;
|
|
||||||
import cn.iocoder.yudao.adminserver.modules.infra.service.job.InfJobService;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.quartz.Scheduler;
|
||||||
import org.quartz.SchedulerException;
|
import org.quartz.SchedulerException;
|
||||||
|
import org.quartz.impl.StdScheduler;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor;
|
||||||
|
import org.springframework.scheduling.config.ScheduledTask;
|
||||||
|
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -22,10 +28,7 @@ import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Collection;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
|
@ -39,6 +42,15 @@ public class InfJobController {
|
||||||
@Resource
|
@Resource
|
||||||
private InfJobService jobService;
|
private InfJobService jobService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SchedulerFactoryBean schedulerFactoryBean;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StdScheduler stdScheduler;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ScheduledAnnotationBeanPostProcessor scheduledAnnotationBeanPostProcessor;
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@ApiOperation("创建定时任务")
|
@ApiOperation("创建定时任务")
|
||||||
@PreAuthorize("@ss.hasPermission('infra:job:create')")
|
@PreAuthorize("@ss.hasPermission('infra:job:create')")
|
||||||
|
@ -111,6 +123,15 @@ public class InfJobController {
|
||||||
@PreAuthorize("@ss.hasPermission('infra:job:query')")
|
@PreAuthorize("@ss.hasPermission('infra:job:query')")
|
||||||
public CommonResult<PageResult<InfJobRespVO>> getJobPage(@Valid InfJobPageReqVO pageVO) {
|
public CommonResult<PageResult<InfJobRespVO>> getJobPage(@Valid InfJobPageReqVO pageVO) {
|
||||||
PageResult<InfJobDO> pageResult = jobService.getJobPage(pageVO);
|
PageResult<InfJobDO> pageResult = jobService.getJobPage(pageVO);
|
||||||
|
Scheduler scheduler = schedulerFactoryBean.getScheduler();
|
||||||
|
Set<ScheduledTask> scheduledTasks = scheduledAnnotationBeanPostProcessor.getScheduledTasks();
|
||||||
|
Iterator<ScheduledTask> scheduledTaskIterator = scheduledTasks.iterator();
|
||||||
|
while (scheduledTaskIterator.hasNext()) {
|
||||||
|
System.err.println("=================================");
|
||||||
|
ScheduledTask scheduledTask = scheduledTaskIterator.next();
|
||||||
|
scheduledAnnotationBeanPostProcessor.postProcessAfterInitialization(scheduledTask, scheduledTask.toString());
|
||||||
|
System.err.println("=================================");
|
||||||
|
}
|
||||||
return success(InfJobConvert.INSTANCE.convertPage(pageResult));
|
return success(InfJobConvert.INSTANCE.convertPage(pageResult));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,3 +3,5 @@ ENV = 'production'
|
||||||
|
|
||||||
# 芋道管理系统/生产环境
|
# 芋道管理系统/生产环境
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
VUE_APP_BASE_API = '/prod-api'
|
||||||
|
# 静态资源地址
|
||||||
|
PUBLIC_PATH = 'yudao-admin'
|
||||||
|
|
|
@ -10,7 +10,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
APP_NAME = 'yudao-admin-ui'
|
APP_NAME = 'yudao-admin'
|
||||||
NGINX_WORKDIR = '/home/pi/mydata/nginx/html/'
|
NGINX_WORKDIR = '/home/pi/mydata/nginx/html/'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ pipeline {
|
||||||
|
|
||||||
stage('部署') {
|
stage('部署') {
|
||||||
steps {
|
steps {
|
||||||
sh 'cp -rf ' + "${env.APP_NAME}" + '/dist/. ' + "${env.NGINX_WORKDIR}"
|
sh 'cp -rf ' + "${env.APP_NAME}" + '/dist/. ' + "${env.NGINX_WORKDIR}" + "${env.APP_NAME}"
|
||||||
sh 'tar -zcvf ' + "${env.APP_NAME}" + '/'+ "${env.APP_NAME}" + '.tar.gz ' + "${env.APP_NAME}" + '/dist/'
|
sh 'tar -zcvf ' + "${env.APP_NAME}" + '/'+ "${env.APP_NAME}" + '.tar.gz ' + "${env.APP_NAME}" + '/dist/'
|
||||||
archiveArtifacts "${env.APP_NAME}" + '/'+ "${env.APP_NAME}" + '.tar.gz'
|
archiveArtifacts "${env.APP_NAME}" + '/'+ "${env.APP_NAME}" + '.tar.gz'
|
||||||
//TODO 考虑刷新缓存的问题
|
//TODO 考虑刷新缓存的问题
|
||||||
|
|
Loading…
Reference in New Issue