mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-15 06:29:01 +08:00
✨ 添加新特性。 ignore-urls 直接通过Inner 注解同步
This commit is contained in:
1 parent
53a9803c7e
commit
5cb1a24ea8
19 files changed
+73
-43
No files matched your search
+2
-2
@@ -59,11 +59,11 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
|
||||
}
|
||||
// 验证令牌信息
|
||||
OAuth2Authentication auth2Authentication = tokenService.loadAuthentication(tokens.split(" ")[1]);
|
||||
if(ObjectUtil.isNotNull(auth2Authentication)) {
|
||||
if (ObjectUtil.isNotNull(auth2Authentication)) {
|
||||
SecurityContextHolder.getContext().setAuthentication(auth2Authentication);
|
||||
accessor.setUser(() -> (String) auth2Authentication.getPrincipal());
|
||||
return message;
|
||||
}else{
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -18,16 +18,18 @@
|
||||
package com.pig4cloud.pigx.act.controller;
|
||||
|
||||
import com.pig4cloud.pigx.act.service.EditorService;
|
||||
import com.pig4cloud.pigx.common.security.annotation.Inner;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018/9/25
|
||||
* @date 2018/4/13
|
||||
*/
|
||||
@Inner(value = false)
|
||||
@RestController
|
||||
@RequestMapping("/service")
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/service")
|
||||
public class EditorController {
|
||||
private final EditorService editorService;
|
||||
|
||||
|
||||
+2
@@ -21,6 +21,7 @@ import cn.hutool.core.io.IoUtil;
|
||||
import com.pig4cloud.pigx.act.service.ProcessService;
|
||||
import com.pig4cloud.pigx.common.core.constant.enums.ResourceTypeEnum;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import com.pig4cloud.pigx.common.security.annotation.Inner;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -46,6 +47,7 @@ public class ProcessController {
|
||||
return new R<>(processService.getProcessByPage(params));
|
||||
}
|
||||
|
||||
@Inner(value = false)
|
||||
@GetMapping(value = "/resource/{proInsId}/{procDefId}/{resType}")
|
||||
public ResponseEntity resourceRead(@PathVariable String procDefId, @PathVariable String proInsId, @PathVariable String resType) {
|
||||
|
||||
|
||||
+2
@@ -21,6 +21,7 @@ import cn.hutool.core.io.IoUtil;
|
||||
import com.pig4cloud.pigx.act.dto.LeaveBillDto;
|
||||
import com.pig4cloud.pigx.act.service.ActTaskService;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import com.pig4cloud.pigx.common.security.annotation.Inner;
|
||||
import com.pig4cloud.pigx.common.security.util.SecurityUtils;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
@@ -57,6 +58,7 @@ public class TaskController {
|
||||
return new R(actTaskService.submitTask(leaveBillDto));
|
||||
}
|
||||
|
||||
@Inner(value = false)
|
||||
@GetMapping("/view/{id}")
|
||||
public ResponseEntity viewCurrentImage(@PathVariable String id) {
|
||||
InputStream imageStream = actTaskService.viewByTaskId(id);
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ public class DynamicDataSourceConfig implements TransactionManagementConfigurer
|
||||
HikariDataSource ds = new HikariDataSource();
|
||||
ds.setJdbcUrl(String.valueOf(db.get(DataSourceConstant.DS_JDBC_URL)));
|
||||
ds.setDriverClassName(Driver.class.getName());
|
||||
ds.setUsername((String) db.get(DataSourceConstant.DS_NAME));
|
||||
ds.setUsername((String) db.get(DataSourceConstant.DS_USER_NAME));
|
||||
|
||||
String decPwd = stringEncryptor.decrypt((String) db.get(DataSourceConstant.DS_USER_PWD));
|
||||
ds.setPassword(decPwd);
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ class AutowireCapableBeanJobFactory extends SpringBeanJobFactory {
|
||||
protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception {
|
||||
Object jobInstance = super.createJobInstance(bundle);
|
||||
this.beanFactory.autowireBean(jobInstance);
|
||||
this.beanFactory.initializeBean(jobInstance, (String) null);
|
||||
this.beanFactory.initializeBean(jobInstance, null);
|
||||
return jobInstance;
|
||||
}
|
||||
}
|
||||
-3
@@ -23,7 +23,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.pig4cloud.pigx.common.core.constant.CommonConstants;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import com.pig4cloud.pigx.common.data.tenant.TenantContextHolder;
|
||||
import com.pig4cloud.pigx.common.log.annotation.SysLog;
|
||||
import com.pig4cloud.pigx.common.security.util.SecurityUtils;
|
||||
import com.pig4cloud.pigx.daemon.quartz.entity.SysJob;
|
||||
@@ -67,7 +66,6 @@ public class SysJobController {
|
||||
@GetMapping("/page")
|
||||
@ApiOperation(value = "分页定时业务查询")
|
||||
public R getSysJobPage(Page page, SysJob sysJob) {
|
||||
sysJob.setTenantId(TenantContextHolder.getTenantId());
|
||||
return R.builder().data(sysJobService.page(page, Wrappers.query(sysJob))).build();
|
||||
}
|
||||
|
||||
@@ -97,7 +95,6 @@ public class SysJobController {
|
||||
public R save(@RequestBody SysJob sysJob) {
|
||||
sysJob.setJobStatus(JOB_STATUS_RELEASE.getType());
|
||||
sysJob.setCreateBy(SecurityUtils.getUser().getUsername());
|
||||
sysJob.setTenantId(TenantContextHolder.getTenantId());
|
||||
return R.builder().data(sysJobService.save(sysJob)).build();
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -20,7 +20,6 @@ package com.pig4cloud.pigx.daemon.quartz.controller;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import com.pig4cloud.pigx.common.data.tenant.TenantContextHolder;
|
||||
import com.pig4cloud.pigx.daemon.quartz.entity.SysJobLog;
|
||||
import com.pig4cloud.pigx.daemon.quartz.service.SysJobLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -53,7 +52,6 @@ public class SysJobLogController {
|
||||
@GetMapping("/page")
|
||||
@ApiOperation(value = "分页定时任务日志查询")
|
||||
public R getSysJobLogPage(Page page, SysJobLog sysJobLog) {
|
||||
sysJobLog.setTenantId(TenantContextHolder.getTenantId());
|
||||
return R.builder().data(sysJobLogService.page(page, Wrappers.query(sysJobLog))).build();
|
||||
}
|
||||
}
|
||||
+2
@@ -1,6 +1,7 @@
|
||||
package com.pig4cloud.pigx.daemon.quartz.task;
|
||||
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import com.pig4cloud.pigx.common.security.annotation.Inner;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -22,6 +23,7 @@ public class RestTaskDemo {
|
||||
/**
|
||||
* 测试REST风格调用定时任务的演示方法
|
||||
*/
|
||||
@Inner(value = false)
|
||||
@GetMapping("/{param}")
|
||||
public R demoMethod(@PathVariable("param") String param) {
|
||||
log.info("测试于:{},传入参数{}", LocalDateTime.now(), param);
|
||||
|
||||
+2
@@ -2,6 +2,7 @@ package com.pig4cloud.pigx.mp.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
|
||||
import com.pig4cloud.pigx.common.security.annotation.Inner;
|
||||
import com.pig4cloud.pigx.mp.config.WxMpConfiguration;
|
||||
import com.pig4cloud.pigx.mp.config.WxMpContextHolder;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
* 微信接入入口
|
||||
*/
|
||||
@Slf4j
|
||||
@Inner(value = false)
|
||||
@RestController
|
||||
@RequestMapping("/{appId}/portal")
|
||||
public class WxPortalController {
|
||||
|
||||
Reference in new issue
Block a user