Skip to content

Commit

Permalink
Merge branch 'dev_remote' into feature-support-suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
zackyoungh committed Nov 10, 2023
2 parents b9d2569 + 9e59996 commit d8693be
Show file tree
Hide file tree
Showing 278 changed files with 10,966 additions and 6,437 deletions.
37 changes: 0 additions & 37 deletions dinky-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

<properties>
<expand.scope>provided</expand.scope>
<jgit.version>5.13.1.202206130422-r</jgit.version>
<postgresql.version>42.5.1</postgresql.version>
</properties>

Expand Down Expand Up @@ -170,15 +169,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- sa-token 持久化 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-core</artifactId>
Expand Down Expand Up @@ -298,28 +288,6 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.archive</artifactId>
<version>${jgit.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.jsch</artifactId>
<version>${jgit.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-ldap</artifactId>
Expand All @@ -339,11 +307,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- 获取系统信息 -->
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.paimon</groupId>
<artifactId>paimon-bundle</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions dinky-admin/src/main/java/org/dinky/aop/LogAspect.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.dinky.aop;

import org.dinky.context.UserInfoContextHolder;
import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.enums.BusinessStatus;
import org.dinky.data.model.OperateLog;
import org.dinky.data.model.User;
Expand Down Expand Up @@ -63,7 +63,7 @@
@Component
public class LogAspect {

@Pointcut("@annotation(org.dinky.data.annotation.Log)")
@Pointcut("@annotation(org.dinky.data.annotations.Log)")
public void logPointCut() {}

/**
Expand Down
6 changes: 2 additions & 4 deletions dinky-admin/src/main/java/org/dinky/aop/ProcessAspect.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,8 @@ public Object processStepAround(ProceedingJoinPoint joinPoint, ProcessStep proce
contextHolder.finishedStep(MDC.get(PROCESS_NAME), step, ProcessStatus.FAILED, e);
throw e;
} finally {
// If a parent step exists, it is restored after the execution is complete
if (parentStep != null) {
MDC.put(PROCESS_STEP, parentStep);
}
// restored after the execution is complete
MDC.put(PROCESS_STEP, parentStep);
}
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@
import org.springframework.validation.FieldError;
import org.springframework.validation.ObjectError;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

Expand All @@ -55,8 +54,7 @@
*
* @since 2022/2/2 22:22
*/
@ControllerAdvice
@ResponseBody
@RestControllerAdvice
public class WebExceptionHandler {

private static final Logger logger = LoggerFactory.getLogger(WebExceptionHandler.class);
Expand Down
31 changes: 0 additions & 31 deletions dinky-admin/src/main/java/org/dinky/configure/AppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,37 +72,6 @@ public LocaleChangeInterceptor localeChangeInterceptor() {
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(localeChangeInterceptor());
// 注册Sa-Token的路由拦截器

// registry.addInterceptor(new SaInterceptor(handle -> {
// // 根据路由划分模块,不同模块不同鉴权
// SaRouter.match("/api/alertGroup/**", r ->
// StpUtil.checkPermission("alertGroup"));
// SaRouter.match("/api/alertHistory/**", r ->
// StpUtil.checkPermission("alertHistory"));
// SaRouter.match("/api/alertInstance/**", r ->
// StpUtil.checkPermission("alertInstance"));
// SaRouter.match("/api/catalogue/**", r ->
// StpUtil.checkPermission("catalogue"));
// SaRouter.match("/api/clusterConfiguration/**", r ->
// StpUtil.checkPermission("clusterConfiguration"));
// SaRouter.match("/api/cluster/**", r ->
// StpUtil.checkPermission("clusterInstance"));
// SaRouter.match("/api/database/**", r ->
// StpUtil.checkPermission("database"));
// SaRouter.match("/api/document/**", r ->
// StpUtil.checkPermission("document"));
// SaRouter.match("/api/fragment/**", r ->
// StpUtil.checkPermission("fragment"));
// SaRouter.match("/api/git/**", r -> StpUtil.checkPermission("git"));
// SaRouter.match("/api/history/**", r ->
// StpUtil.checkPermission("history"));
//
// }))
// .addPathPatterns("/api/**")
// .excludePathPatterns("/api/login")
// .excludePathPatterns("/druid/**")
// .excludePathPatterns("/openapi/**");

registry.addInterceptor(new SaInterceptor(handler -> StpUtil.checkLogin()))
.addPathPatterns("/api/**")
.excludePathPatterns(
Expand Down
63 changes: 0 additions & 63 deletions dinky-admin/src/main/java/org/dinky/configure/CacheConfig.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package org.dinky.configure;

import org.dinky.context.TenantContextHolder;
import org.dinky.data.annotation.ConditionalOnListProperty;
import org.dinky.interceptor.PostgreSQLPrepareInterceptor;
import org.dinky.interceptor.PostgreSQLQueryInterceptor;
import org.dinky.mybatis.handler.DateMetaObjectHandler;
Expand All @@ -34,6 +33,7 @@
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
Expand Down Expand Up @@ -80,8 +80,7 @@ public class MybatisPlusConfig {
"dinky_task_version");

@Bean
// @ConditionalOnProperty(name = "spring.profiles.active", havingValue = "pgsql , jmx")
@ConditionalOnListProperty(name = "spring.profiles.active", havingValue = "pgsql")
@Profile("pgsql")
public PostgreSQLQueryInterceptor postgreSQLQueryInterceptor() {
return new PostgreSQLQueryInterceptor();
}
Expand All @@ -92,8 +91,7 @@ public PostgreSQLQueryInterceptor postgreSQLQueryInterceptor() {
* @return {@linkplain PostgreSQLPrepareInterceptor}
*/
@Bean
// @ConditionalOnProperty(name = "spring.profiles.active", havingValue = "pgsql , jmx")
@ConditionalOnListProperty(name = "spring.profiles.active", havingValue = "pgsql")
@Profile("pgsql")
public PostgreSQLPrepareInterceptor postgreSQLPrepareInterceptor() {
return new PostgreSQLPrepareInterceptor();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import cn.dev33.satoken.jwt.StpLogicJwtForSimple;
import cn.dev33.satoken.stp.StpLogic;
import cn.dev33.satoken.util.SaTokenConsts;

@Configuration
public class SaTokenConfigure {
// Sa-Token 整合 jwt (Simple 简单模式)
@Bean
public StpLogic getStpLogicJwt() {
return new StpLogicJwtForSimple();
// return new StpLogicJwtForSimple();
return new StpLogic(SaTokenConsts.TOKEN_STYLE_RANDOM_32);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import org.dinky.configure.schedule.BaseSchedule;
import org.dinky.context.MetricsContextHolder;
import org.dinky.data.annotation.GaugeM;
import org.dinky.data.annotations.GaugeM;
import org.dinky.data.enums.MetricsType;
import org.dinky.data.metrics.BaseMetrics;
import org.dinky.data.metrics.Cpu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public void finishedProcess(String processName, ProcessStatus status, Throwable
if (e != null) {
appendLog(processName, null, LogUtil.getError(e.getCause()), true);
}
String filePath = String.format("%s/tmp/log/%s.json", System.getProperty("user.dir"), process.getTitle());
String filePath = String.format("%s/tmp/log/%s.json", System.getProperty("user.dir"), processName);
if (FileUtil.exist(filePath)) {
Assert.isTrue(FileUtil.del(filePath));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.dinky.controller;

import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.dto.TaskDTO;
import org.dinky.data.enums.BusinessType;
import org.dinky.data.enums.Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.dinky.controller;

import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.constant.PermissionConstants;
import org.dinky.data.enums.BusinessType;
import org.dinky.data.enums.Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.dinky.controller;

import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.enums.BusinessType;
import org.dinky.data.enums.Status;
import org.dinky.data.model.AlertHistory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import org.dinky.alert.AlertPool;
import org.dinky.alert.AlertResult;
import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.constant.PermissionConstants;
import org.dinky.data.dto.AlertInstanceDTO;
import org.dinky.data.enums.BusinessType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.dinky.controller;

import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.constant.PermissionConstants;
import org.dinky.data.enums.BusinessType;
import org.dinky.data.enums.Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.dinky.controller;

import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.constant.PermissionConstants;
import org.dinky.data.enums.BusinessType;
import org.dinky.data.enums.Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.dinky.controller;

import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.dto.CatalogueTaskDTO;
import org.dinky.data.enums.BusinessType;
import org.dinky.data.enums.Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.dinky.controller;

import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.constant.PermissionConstants;
import org.dinky.data.dto.ClusterConfigurationDTO;
import org.dinky.data.enums.BusinessType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.dinky.controller;

import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.constant.PermissionConstants;
import org.dinky.data.dto.ClusterInstanceDTO;
import org.dinky.data.enums.BusinessType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.dinky.controller;

import org.dinky.assertion.Asserts;
import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.constant.CommonConstant;
import org.dinky.data.constant.PermissionConstants;
import org.dinky.data.dto.DataBaseDTO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.dinky.controller;

import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.constant.PermissionConstants;
import org.dinky.data.enums.BusinessType;
import org.dinky.data.enums.Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.dinky.controller;

import org.dinky.assertion.Asserts;
import org.dinky.data.annotation.Log;
import org.dinky.data.annotations.Log;
import org.dinky.data.enums.BusinessType;
import org.dinky.data.exception.BusException;
import org.dinky.data.model.FlinkUdfManifest;
Expand Down
Loading

0 comments on commit d8693be

Please sign in to comment.