embedding;
25 |
26 | /**
27 | * 这个嵌入在列表中的位置
28 | */
29 | Integer index;
30 | }
31 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/embedding/EmbeddingRequest.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.embedding;
2 |
3 | import lombok.*;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * @Desc 创建表示输入文本的嵌入向量。
9 | * @Url https://beta.openai.com/docs/api-reference/embeddings/create
10 | * @Author Sinda
11 | * @Date 2023/2/10
12 | */
13 | @Data
14 | @Builder
15 | @NoArgsConstructor
16 | @AllArgsConstructor
17 | public class EmbeddingRequest {
18 |
19 | /**
20 | * 要使用的模型名称。
21 | * 如果使用新的v1/embeddings端点 不能为空
22 | */
23 | String model;
24 |
25 | /**
26 | * 输入文本以获取嵌入,编码为字符串或令牌数组。
27 | * 要在单个请求中获得多个输入的嵌入,请传递一个字符串数组或令牌数组数组。
28 | * 每个输入的token长度不能超过2048个。
29 | *
30 | * 除非你是嵌入代码,否则我们建议将输入中的换行符(\n)替换为一个空格,
31 | * 当换行符出现时,我们观察到较差的结果。
32 | */
33 | @NonNull
34 | List input;
35 |
36 | /**
37 | * 代表终端用户的唯一标识符
38 | */
39 | String user;
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/embedding/EmbeddingResult.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.embedding;
2 |
3 | import com.xhuicloud.ai.chatgpt.model.Usage;
4 | import lombok.Data;
5 |
6 | import java.util.List;
7 |
8 | /**
9 | * @Desc 一个包含answer api响应的对象
10 | * @Author Sinda
11 | * @Date 2023/2/10
12 | */
13 | @Data
14 | public class EmbeddingResult {
15 | /**
16 | * 用于生成嵌入的GPT-3模型
17 | */
18 | String model;
19 |
20 | /**
21 | * 返回的对象类型应该是"list"
22 | */
23 | String object;
24 |
25 | /**
26 | * 计算嵌入的列表
27 | */
28 | List data;
29 |
30 | /**
31 | * 此请求的API使用情况
32 | */
33 | Usage usage;
34 |
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/file/File.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.file;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * @Desc 文件用于上传可与微调等功能一起使用的文档.
7 | * @Url https://beta.openai.com/docs/api-reference/files
8 | * @Author Sinda
9 | * @Date 2023/2/10
10 | */
11 | @Data
12 | public class File {
13 |
14 |
15 | /**
16 | * 此文件的唯一id.
17 | */
18 | String id;
19 |
20 | /**
21 | * 返回的对象类型应该是"file"
22 | */
23 | String object;
24 |
25 | /**
26 | * 文件大小(字节)
27 | */
28 | Long bytes;
29 |
30 | /**
31 | * 秒为单位的创建时间
32 | */
33 | Long createdAt;
34 |
35 | /**
36 | * 文件的名称。
37 | */
38 | String filename;
39 |
40 | /**
41 | * 文件用途的描述。
42 | */
43 | String purpose;
44 | }
45 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/finetune/FineTuneEvent.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.finetune;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * @Desc 管理微调作业,以根据特定训练数据定制模型。
7 | * @Url https://beta.openai.com/docs/api-reference/fine-tunes
8 | * @Author Sinda
9 | * @Date 2023/2/10
10 | */
11 | @Data
12 | public class FineTuneEvent {
13 |
14 | /**
15 | * 返回的对象类型应为"fine-tune-event"。
16 | */
17 | String object;
18 |
19 | /**
20 | * 秒为单位的创建时间。
21 | */
22 | Long createdAt;
23 |
24 | /**
25 | * 该消息的日志级别。
26 | */
27 | String level;
28 |
29 | /**
30 | * 事件消息。
31 | */
32 | String message;
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/finetune/HyperParameters.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.finetune;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * @Desc 微调作业 参数
7 | * @Author Sinda
8 | * @Date 2023/2/10
9 | */
10 | @Data
11 | public class HyperParameters {
12 |
13 | /**
14 | * 用于微调的批大小
15 | */
16 | String batchSize;
17 |
18 | /**
19 | * 用于训练的学习率乘数。
20 | */
21 | Double learningRateMultiplier;
22 |
23 | /**
24 | * 训练模型的epoch数。
25 | */
26 | Integer nEpochs;
27 |
28 | /**
29 | * 用于提示令牌损失的权重
30 | */
31 | Double promptLossWeight;
32 | }
33 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/image/CreateImageEditRequest.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.image;
2 |
3 | import lombok.*;
4 |
5 | /**
6 | * @Desc 要求OpenAi根据提示编辑图像 除prompt外的所有字段都是可选的
7 | * @Url https://beta.openai.com/docs/api-reference/images/create-edit
8 | * @Author Sinda
9 | * @Date 2023/2/10
10 | */
11 | @Data
12 | @Builder
13 | @NoArgsConstructor
14 | @AllArgsConstructor
15 | public class CreateImageEditRequest {
16 |
17 | /**
18 | * 所需图像的文本描述。最大长度为1000个字符。
19 | */
20 | @NonNull
21 | String prompt;
22 |
23 | /**
24 | * 要生成的图像数量。必须在1到10之间。默认值为1。
25 | */
26 | Integer n;
27 |
28 | /**
29 | * 生成图像的大小。必须是256x256、512x512或1024x1024中的一个。默认为“1024x1024”。
30 | */
31 | String size;
32 |
33 | /**
34 | * 所生成图像的返回格式。必须是url或b64_json之一。默认为url。
35 | */
36 | String responseFormat;
37 |
38 | /**
39 | * 代表终端用户的唯一标识符,这将帮助OpenAI监控和检测滥用。
40 | */
41 | String user;
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/image/CreateImageRequest.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.image;
2 |
3 | import lombok.*;
4 |
5 | /**
6 | * @Desc 请求OpenAi根据提示创建图像 除prompt外的所有字段都是可选的
7 | * @Url https://beta.openai.com/docs/api-reference/images/create
8 | * @Author Sinda
9 | * @Date 2023/2/10
10 | */
11 | @Data
12 | @Builder
13 | @NoArgsConstructor
14 | @AllArgsConstructor
15 | public class CreateImageRequest {
16 |
17 | /**
18 | * 所需图像的文本描述。最大长度为1000个字符。
19 | */
20 | @NonNull
21 | String prompt;
22 |
23 | /**
24 | * 要生成的图像数量。必须在1到10之间。默认值为1。
25 | */
26 | Integer n;
27 |
28 | /**
29 | * 生成图像的大小。必须是256x256、512x512或1024x1024中的一个。默认为“1024x1024”。
30 | */
31 | String size;
32 |
33 | /**
34 | * 所生成图像的返回格式。必须是url或b64_json之一。默认为url。
35 | */
36 | String responseFormat;
37 |
38 | /**
39 | * 代表终端用户的唯一标识符,这将帮助OpenAI监控和检测滥用。
40 | */
41 | String user;
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/image/CreateImageVariationRequest.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.image;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | /**
9 | * @Desc 请求OpenAi创建一个图像的变体 所有字段都是可选的
10 | * @Url https://beta.openai.com/docs/api-reference/images/create-variation
11 | * @Author Sinda
12 | * @Date 2023/2/10
13 | */
14 | @Data
15 | @Builder
16 | @NoArgsConstructor
17 | @AllArgsConstructor
18 | public class CreateImageVariationRequest {
19 |
20 | /**
21 | * 要生成的图像数量。必须在1到10之间。默认值为1。
22 | */
23 | Integer n;
24 |
25 | /**
26 | * 生成图像的大小。必须是256x256、512x512或1024x1024中的一个。默认为“1024x1024”。
27 | */
28 | String size;
29 |
30 | /**
31 | * 所生成图像的返回格式。必须是url或b64_json之一。默认为url。
32 | */
33 | String responseFormat;
34 |
35 | /**
36 | * 代表终端用户的唯一标识符,这将帮助OpenAI监控和检测滥用。
37 | */
38 | String user;
39 | }
40 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/image/Image.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.image;
2 |
3 | import com.fasterxml.jackson.annotation.JsonProperty;
4 | import lombok.Data;
5 |
6 | /**
7 | * @Desc
8 | * @Author Sinda
9 | * @Date 2023/2/10
10 | */
11 | @Data
12 | public class Image {
13 |
14 | String url;
15 |
16 | @JsonProperty("b64_json")
17 | String b64Json;
18 | }
19 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/image/ImageResult.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.image;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * @Desc
9 | * @Author Sinda
10 | * @Date 2023/2/10
11 | */
12 | @Data
13 | public class ImageResult {
14 |
15 | Long createdAt;
16 |
17 | List data;
18 | }
19 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/interceptor/AuthenticationInterceptor.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.interceptor;
2 |
3 | import okhttp3.Interceptor;
4 | import okhttp3.Request;
5 | import okhttp3.Response;
6 |
7 | import java.io.IOException;
8 |
9 | /**
10 | * @Desc
11 | * @Author Sinda
12 | * @Date 2023/2/10
13 | */
14 | public class AuthenticationInterceptor implements Interceptor {
15 |
16 | private final String token;
17 |
18 | public AuthenticationInterceptor(String token) {
19 | this.token = token;
20 | }
21 |
22 | @Override
23 | public Response intercept(Chain chain) throws IOException {
24 | Request request = chain.request()
25 | .newBuilder()
26 | .header("Authorization", "Bearer " + token)
27 | .build();
28 | return chain.proceed(request);
29 | }
30 | }
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/model/DeleteResult.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.model;
2 |
3 | /**
4 | * @Desc 删除对象时的响应
5 | * @Author Sinda
6 | * @Date 2023/2/10
7 | */
8 | public class DeleteResult {
9 |
10 | String id;
11 |
12 | /**
13 | * 删除的对象类型,例如“文件”或“模型”
14 | */
15 | String object;
16 |
17 | /**
18 | * 是否成功
19 | */
20 | boolean deleted;
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/model/Model.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.model;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * @Desc
9 | * @Author Sinda
10 | * @Date 2023/2/10
11 | */
12 | @Data
13 | public class Model {
14 | /**
15 | * 此模型的标识符,用于在执行补全等操作时指定模型
16 | */
17 | public String id;
18 |
19 | /**
20 | * 返回的对象类型应该是"model"
21 | */
22 | public String object;
23 |
24 | /**
25 | * GPT-3模型的所有者,通常是“openai”
26 | */
27 | public String ownedBy;
28 |
29 | /**
30 | * 此模型的权限列表
31 | */
32 | public List permission;
33 |
34 | /**
35 | * this及其父模型(如果适用)所基于的根模型
36 | */
37 | public String root;
38 |
39 | /**
40 | * 父模型
41 | */
42 | public String parent;
43 | }
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/model/OpenAiResponse.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.model;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * @Desc
9 | * @Author Sinda
10 | * @Date 2023/2/10
11 | */
12 | @Data
13 | public class OpenAiResponse {
14 | /**
15 | * 结果列表
16 | */
17 | public List data;
18 |
19 | /**
20 | * 返回的对象类型应该是"list"
21 | */
22 | public String object;
23 | }
24 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/model/Permission.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.model;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * @Desc 没有文档。。
7 | * @Author Sinda
8 | * @Date 2023/2/10
9 | */
10 | @Data
11 | public class Permission {
12 |
13 | public String id;
14 |
15 | public String object;
16 |
17 | public long created;
18 |
19 | public boolean allowCreateEngine;
20 |
21 | public boolean allowSampling;
22 |
23 | public boolean allowLogProbs;
24 |
25 | public boolean allowSearchIndices;
26 |
27 | public boolean allowView;
28 |
29 | public boolean allowFineTuning;
30 |
31 | public String organization;
32 |
33 | public String group;
34 |
35 | public boolean isBlocking;
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/model/Usage.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.model;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * @Desc 请求使用的OpenAI资源
7 | * @Author Sinda
8 | * @Date 2023/2/10
9 | */
10 | @Data
11 | public class Usage {
12 |
13 | /**
14 | * 使用的提示令牌的数量。
15 | */
16 | long promptTokens;
17 |
18 | /**
19 | * 所使用的完成令牌的数量。
20 | */
21 | long completionTokens;
22 |
23 | /**
24 | * 使用的令牌总数
25 | */
26 | long totalTokens;
27 | }
28 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/moderation/Moderation.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.moderation;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * @Desc 分类文本是否违反 OpenAI 的内容政策
7 | * @Author Sinda
8 | * @Date 2023/2/10
9 | */
10 | @Data
11 | public class Moderation {
12 |
13 | /**
14 | * 如果模型将内容分类为违反OpenAI的内容策略,则设置为true,否则为false
15 | */
16 | public boolean flagged;
17 |
18 | /**
19 | * 对象,其中包含每个类别的二进制内容策略违反标志。
20 | * 对于每个类别,如果模型将相应类别标记为违规,则该值为true,否则为false。
21 | */
22 | public ModerationCategories categories;
23 |
24 | /**
25 | * 对象,包含模型输出的每个类别的原始分数,表示模型对数据的置信度
26 | * 输入违反了OpenAI对类别的政策。
27 | * 该值介于0和1之间,其中值越大表示置信度越高。
28 | * 分数不应被解释为概率。
29 | */
30 | public ModerationCategoryScores categoryScores;
31 | }
32 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/moderation/ModerationCategories.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.moderation;
2 |
3 | import com.fasterxml.jackson.annotation.JsonProperty;
4 | import lombok.Data;
5 |
6 | /**
7 | * @Desc
8 | * @Author Sinda
9 | * @Date 2023/2/10
10 | */
11 | @Data
12 | public class ModerationCategories {
13 |
14 |
15 | public boolean hate;
16 |
17 | @JsonProperty("hate/threatening")
18 | public boolean hateThreatening;
19 |
20 | @JsonProperty("self-harm")
21 | public boolean selfHarm;
22 |
23 | public boolean sexual;
24 |
25 | @JsonProperty("sexual/minors")
26 | public boolean sexualMinors;
27 |
28 | public boolean violence;
29 |
30 | @JsonProperty("violence/graphic")
31 | public boolean violenceGraphic;
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/moderation/ModerationCategoryScores.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.moderation;
2 |
3 | import com.fasterxml.jackson.annotation.JsonProperty;
4 | import lombok.Data;
5 |
6 | /**
7 | * @Desc
8 | * @Author Sinda
9 | * @Date 2023/2/10
10 | */
11 | @Data
12 | public class ModerationCategoryScores {
13 |
14 | public double hate;
15 |
16 | @JsonProperty("hate/threatening")
17 | public double hateThreatening;
18 |
19 | @JsonProperty("self-harm")
20 | public double selfHarm;
21 |
22 | public double sexual;
23 |
24 | @JsonProperty("sexual/minors")
25 | public double sexualMinors;
26 |
27 | public double violence;
28 |
29 | @JsonProperty("violence/graphic")
30 | public double violenceGraphic;
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/moderation/ModerationRequest.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.moderation;
2 |
3 | import lombok.*;
4 |
5 | /**
6 | * @Desc
7 | * @Author Sinda
8 | * @Date 2023/2/10
9 | */
10 | @Data
11 | @Builder
12 | @NoArgsConstructor
13 | @AllArgsConstructor
14 | public class ModerationRequest {
15 |
16 | /**
17 | * 输入文本进行分类。
18 | */
19 | @NonNull
20 | String input;
21 |
22 | /**
23 | * 要使用的模型名称,默认为text-moderation-stable。
24 | */
25 | String model;
26 | }
27 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/chatgpt/moderation/ModerationResult.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.chatgpt.moderation;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * @Desc
9 | * @Author Sinda
10 | * @Date 2023/2/10
11 | */
12 | @Data
13 | public class ModerationResult {
14 | /**
15 | * 分配给该审核的唯一id。
16 | */
17 | public String id;
18 |
19 | /**
20 | * 模型
21 | */
22 | public String model;
23 |
24 | public List results;
25 | }
26 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/controller/ChatController.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.controller;
2 |
3 | import io.swagger.annotations.Api;
4 | import lombok.AllArgsConstructor;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | /**
9 | * @Desc
10 | * @Author Sinda
11 | * @Date 2023/2/10
12 | */
13 | @RestController
14 | @AllArgsConstructor
15 | @RequestMapping("/chat")
16 | @Api(value = "chat", tags = "聊天")
17 | public class ChatController {
18 | }
19 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/controller/ChatRoomController.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.controller;
2 |
3 | import io.swagger.annotations.Api;
4 | import lombok.AllArgsConstructor;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | /**
9 | * @Desc
10 | * @Author Sinda
11 | * @Date 2022/11/9
12 | */
13 | @RestController
14 | @AllArgsConstructor
15 | @RequestMapping("/chat-room")
16 | @Api(value = "chatRoom", tags = "聊天室管理")
17 | public class ChatRoomController {
18 |
19 |
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/XHuiCloud-ai-service/src/main/java/com/xhuicloud/ai/payload/MessagePayload.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.ai.payload;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * @Desc
7 | * @Author Sinda
8 | * @Date 2023/2/16
9 | */
10 | @Data
11 | public class MessagePayload {
12 |
13 | private String messageId;
14 |
15 | private String userId;
16 |
17 | private String text;
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-ai/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | XHuiCloud-business
7 | com.xhuicloud
8 | ${revision}
9 |
10 | 4.0.0
11 | pom
12 | XHuiCloud-ai
13 |
14 |
15 | XHuiCloud-ai-api
16 | XHuiCloud-ai-service
17 |
18 |
19 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-gateway/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre
2 |
3 | MAINTAINER Sinda(sindazeng@gmail.com)
4 |
5 | ENV TZ=Asia/Shanghai
6 |
7 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
8 |
9 | RUN mkdir -p /XHuiCloud-gateway
10 |
11 | WORKDIR /XHuiCloud-gateway
12 |
13 | EXPOSE 15000
14 |
15 | ADD ./target/XHuiCloud-gateway.jar ./
16 |
17 | CMD java -Xms256m -Xmx256m -Xss256k -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar XHuiCloud-gateway.jar
18 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-gateway/src/main/java/com/xhuicloud/gateway/config/CaptchaCacheRedisService.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.gateway.config;
2 |
3 | import com.anji.captcha.service.CaptchaCacheService;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.data.redis.core.StringRedisTemplate;
6 |
7 | import java.util.concurrent.TimeUnit;
8 |
9 | /**
10 | * @Desc
11 | * @Author Sinda
12 | * @Date 2022/10/22
13 | */
14 | public class CaptchaCacheRedisService implements CaptchaCacheService {
15 |
16 | private static final String REDIS = "redis";
17 |
18 | @Autowired
19 | private StringRedisTemplate stringRedisTemplate;
20 |
21 | @Override
22 | public void set(String key, String value, long expiresInSeconds) {
23 | stringRedisTemplate.opsForValue().set(key, value, expiresInSeconds, TimeUnit.SECONDS);
24 | }
25 |
26 | @Override
27 | public boolean exists(String key) {
28 | return stringRedisTemplate.hasKey(key);
29 | }
30 |
31 | @Override
32 | public void delete(String key) {
33 | stringRedisTemplate.delete(key);
34 | }
35 |
36 | @Override
37 | public String get(String key) {
38 | return stringRedisTemplate.opsForValue().get(key);
39 | }
40 |
41 | @Override
42 | public String type() {
43 | return REDIS;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-gateway/src/main/resources/META-INF/services/com.anji.captcha.service.CaptchaCacheService:
--------------------------------------------------------------------------------
1 | com.xhuicloud.gateway.config.CaptchaCacheRedisService
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-gateway/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 15000
3 | spring:
4 | application:
5 | name: @artifactId@
6 | profiles:
7 | active: @profiles.active@
8 | cloud:
9 | nacos:
10 | discovery:
11 | #nacos 地址
12 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
13 | config:
14 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
15 | config:
16 | import:
17 | - optional:nacos:application-common-@profiles.active@.yml
18 | - optional:nacos:xhuicloud-common-@profiles.active@.yml
19 | - optional:nacos:@artifactId@-@profiles.active@.yml
20 |
21 | swagger:
22 | ignore-providers:
23 | - XHuiCloud-auth
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-generator/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre
2 |
3 | MAINTAINER Sinda(sindazeng@gmail.com)
4 |
5 | ENV TZ=Asia/Shanghai
6 |
7 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
8 |
9 | RUN mkdir -p /XHuiCloud-generator
10 |
11 | WORKDIR /XHuiCloud-generator
12 |
13 | EXPOSE 21000
14 |
15 | ADD ./target/XHuiCloud-generator.jar ./
16 |
17 | CMD java -Xms512m -Xmx512m -Xss256k -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar XHuiCloud-generator.jar
18 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-generator/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: @artifactId@
4 | profiles:
5 | active: @profiles.active@
6 | cloud:
7 | nacos:
8 | discovery:
9 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
10 | config:
11 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
12 | config:
13 | import:
14 | - optional:nacos:application-common-@profiles.active@.yml
15 | - optional:nacos:xhuicloud-common-@profiles.active@.yml
16 | - optional:nacos:@artifactId@-@profiles.active@.yml
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-generator/src/main/resources/template/ts/index.ts.ftl:
--------------------------------------------------------------------------------
1 | import { TableColumn } from '@/components/XhTable/crud'
2 |
3 | export const tableColumn: TableColumn[] = [
4 | <#if columns??>
5 | <#list columns as column>
6 | {
7 | label: '${column.columnComment}',
8 | prop: '${column.smallColumnName}',
9 | <#if column.columnKey = 'PRI'>
10 | createDisplay: true,
11 | editDisabled: true,
12 | #if>
13 | operationForm: {},
14 | searchForm: {}
15 | }<#if column_has_next>,#if>
16 | #list>
17 | #if>
18 | ]
19 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-job/XHuiCloud-job-api/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | XHuiCloud-job
7 | com.xhuicloud
8 | ${revision}
9 |
10 | 4.0.0
11 | jar
12 | XHuiCloud-job-api
13 |
14 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-job/XHuiCloud-job-service/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre
2 |
3 | MAINTAINER Sinda(sindazeng@gmail.com)
4 |
5 | ENV TZ=Asia/Shanghai
6 |
7 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
8 |
9 | RUN mkdir -p /XHuiCloud-job-service
10 |
11 | WORKDIR /XHuiCloud-job-service
12 |
13 | EXPOSE 19000
14 |
15 | ADD ./target/XHuiCloud-job-service.jar ./
16 |
17 | CMD java -Xms256m -Xmx256m -Xss256k -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar XHuiCloud-job-service.jar
18 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-job/XHuiCloud-job-service/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: @artifactId@
4 | profiles:
5 | active: @profiles.active@
6 | cloud:
7 | nacos:
8 | discovery:
9 | #nacos 地址
10 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
11 | config:
12 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
13 | config:
14 | import:
15 | - optional:nacos:application-common-@profiles.active@.yml
16 | - optional:nacos:xhuicloud-common-@profiles.active@.yml
17 | - optional:nacos:@artifactId@-@profiles.active@.yml
18 |
19 | #xhuicloud:
20 | # elasticjob:
21 | # zookeeper:
22 | # namespace: XHuicloud-job
23 | # job-type: simple
24 |
25 | server:
26 | port: 19000
27 |
28 | job:
29 | executor:
30 | app-name: xhuicloud-job
31 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-job/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | XHuiCloud-business
7 | com.xhuicloud
8 | ${revision}
9 |
10 | 4.0.0
11 | 分布式定时任务
12 | XHuiCloud-job
13 | pom
14 |
15 | XHuiCloud-job-api
16 | XHuiCloud-job-service
17 |
18 |
19 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-logs/XHuiCloud-logs-api/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | XHuiCloud-logs
7 | com.xhuicloud
8 | ${revision}
9 |
10 | 4.0.0
11 | jar
12 | XHuiCloud-logs-api
13 |
14 |
15 |
16 | com.baomidou
17 | mybatis-plus-extension
18 |
19 |
20 |
21 | ${project.groupId}
22 | XHuiCloud-common-feign
23 |
24 |
25 |
26 | ${project.groupId}
27 | XHuiCloud-common-core
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-logs/XHuiCloud-logs-service/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre
2 |
3 | MAINTAINER Sinda(sindazeng@gmail.com)
4 |
5 | ENV TZ=Asia/Shanghai
6 |
7 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
8 |
9 | RUN mkdir -p /XHuicloud-logs-service
10 |
11 | WORKDIR /XHuicloud-logs-service
12 |
13 | EXPOSE 18000
14 |
15 | ADD ./target/XHuiCloud-logs-service.jar ./
16 |
17 | CMD java -Xms512m -Xmx512m -Xss256k -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar XHuiCloud-logs-service.jar
18 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-logs/XHuiCloud-logs-service/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: @artifactId@
4 | profiles:
5 | active: @profiles.active@
6 | cloud:
7 | nacos:
8 | discovery:
9 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
10 | config:
11 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
12 | config:
13 | import:
14 | - optional:nacos:application-common-@profiles.active@.yml
15 | - optional:nacos:xhuicloud-common-@profiles.active@.yml
16 | - optional:nacos:@artifactId@-@profiles.active@.yml
17 | mysql:
18 | scheme: xhuicloud_audit
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-logs/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | XHuiCloud-business
7 | com.xhuicloud
8 | ${revision}
9 |
10 | 4.0.0
11 | pom
12 |
13 | XHuiCloud-logs-service
14 | XHuiCloud-logs-api
15 |
16 | XHuiCloud-logs
17 |
18 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-monitor/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre
2 |
3 | MAINTAINER Sinda(sindazeng@gmail.com)
4 |
5 | ENV TZ=Asia/Shanghai
6 |
7 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
8 |
9 | RUN mkdir -p /XHuiCloud-monitor
10 |
11 | WORKDIR /XHuiCloud-monitor
12 |
13 | EXPOSE 9090
14 |
15 | ADD ./target/XHuiCloud-monitor.jar ./
16 |
17 | CMD java -Xms256m -Xmx256m -Xss256k -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar XHuiCloud-monitor.jar
18 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-monitor/src/main/java/com/xhuicloud/monitor/XHuiMonitorApplication.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.monitor;
2 |
3 | import de.codecentric.boot.admin.server.config.EnableAdminServer;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
7 |
8 | /**
9 | * @Desc
10 | * @Author Sinda
11 | * @Date 2022/8/21
12 | */
13 | @EnableAdminServer
14 | @EnableDiscoveryClient
15 | @SpringBootApplication
16 | public class XHuiMonitorApplication {
17 |
18 | public static void main(String[] args) {
19 | SpringApplication.run(XHuiMonitorApplication.class, args);
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-monitor/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: @artifactId@
4 | profiles:
5 | active: @profiles.active@
6 | cloud:
7 | nacos:
8 | discovery:
9 | #nacos 地址
10 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
11 |
12 | server:
13 | port: 9090
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-pay/XHuiCloud-pay-api/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | XHuiCloud-pay
7 | com.xhuicloud
8 | ${revision}
9 |
10 | 4.0.0
11 | jar
12 | XHuiCloud-pay-api
13 |
14 |
15 |
16 | com.baomidou
17 | mybatis-plus-extension
18 |
19 |
20 |
21 | ${project.groupId}
22 | XHuiCloud-common-core
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-pay/XHuiCloud-pay-service/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre
2 |
3 | MAINTAINER Sinda(sindazeng@gmail.com)
4 |
5 | ENV TZ=Asia/Shanghai
6 |
7 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
8 |
9 | RUN mkdir -p /XHuiCloud-pay-service
10 |
11 | WORKDIR /XHuiCloud-pay-service
12 |
13 | EXPOSE 23000
14 |
15 | ADD ./target/XHuiCloud-pay-service.jar ./
16 |
17 | CMD java -Xms512m -Xmx512m -Xss256k -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar XHuiCloud-pay-service.jar
18 |
19 |
20 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-pay/XHuiCloud-pay-service/src/main/resources/static/css/tenant.css:
--------------------------------------------------------------------------------
1 | body, html {
2 | height: 100%;
3 | -webkit-tap-highlight-color: transparent;
4 | }
5 | .tenant-logo{
6 | display:inline-block;
7 | margin:20px auto auto 20px;
8 | width:60px;
9 | height:60px;
10 | border-radius:100px;
11 | -webkit-border-radius:100px;
12 | -moz-border-radius:100px;
13 | border:2px solid #fff;
14 | box-shadow:0 0 4px #ccc;
15 | overflow:hidden;
16 | }
17 |
18 | /*图片的样式*/
19 | .tenant-logo img{
20 | width:100%;
21 | min-height:100%;
22 | }
23 | .tenant-names{
24 | display:inline-block;
25 | margin:20px auto auto 20px;
26 | width:80px;
27 | height:80px;
28 | /*border-radius:100px;*/
29 | /*-webkit-border-radius:100px;*/
30 | /*-moz-border-radius:100px;*/
31 | /*border:2px solid #fff;*/
32 | /*box-shadow:0 0 4px #ccc;*/
33 | overflow:hidden;
34 | }
35 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-pay/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | XHuiCloud-business
7 | com.xhuicloud
8 | ${revision}
9 |
10 | 4.0.0
11 | 聚合支付
12 | XHuiCloud-pay
13 | pom
14 |
15 | XHuiCloud-pay-api
16 | XHuiCloud-pay-service
17 |
18 |
19 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-push/XHuiCloud-push-api/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | XHuiCloud-push
7 | com.xhuicloud
8 | ${revision}
9 |
10 | 4.0.0
11 | jar
12 | XHuiCloud-push-api
13 |
14 |
15 |
16 | com.baomidou
17 | mybatis-plus-extension
18 |
19 |
20 |
21 | ${project.groupId}
22 | XHuiCloud-common-feign
23 |
24 |
25 |
26 | ${project.groupId}
27 | XHuiCloud-common-core
28 |
29 |
30 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-push/XHuiCloud-push-service/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre
2 |
3 | MAINTAINER Sinda(sindazeng@gmail.com)
4 |
5 | ENV TZ=Asia/Shanghai
6 |
7 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
8 |
9 | RUN mkdir -p /XHuiCloud-push-service
10 |
11 | WORKDIR /XHuiCloud-push-service
12 |
13 | EXPOSE 22000
14 |
15 | ADD ./target/XHuiCloud-push-service.jar ./
16 |
17 | CMD java -Xms512m -Xmx512m -Xss256k -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar XHuiCloud-push-service.jar
18 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-push/XHuiCloud-push-service/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: @artifactId@
4 | profiles:
5 | active: @profiles.active@
6 | cloud:
7 | nacos:
8 | discovery:
9 | #nacos 地址
10 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
11 | config:
12 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
13 | config:
14 | import:
15 | - optional:nacos:application-common-@profiles.active@.yml
16 | - optional:nacos:xhuicloud-common-@profiles.active@.yml
17 | - optional:nacos:@artifactId@-@profiles.active@.yml
18 |
19 | server:
20 | port: 22000
21 |
22 | mysql:
23 | scheme: xhuicloud_push
24 |
25 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-push/XHuiCloud-push-service/src/main/resources/mapper/WeChatAccountService.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | id, tenant_id, create_time, update_time, is_del, create_id, update_id, template_code,
20 | `name`
21 |
22 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-push/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | XHuiCloud-business
7 | com.xhuicloud
8 | ${revision}
9 |
10 | 4.0.0
11 |
12 | XHuiCloud-push
13 | pom
14 |
15 | XHuiCloud-push-api
16 | XHuiCloud-push-service
17 |
18 |
19 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre
2 |
3 | MAINTAINER Sinda(sindazeng@gmail.com)
4 |
5 | ENV TZ=Asia/Shanghai
6 |
7 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
8 |
9 | RUN mkdir -p /XHuiCloud-register
10 |
11 | WORKDIR /XHuiCloud-register
12 |
13 | EXPOSE 13000
14 |
15 | ADD ./target/XHuiCloud-register.jar ./
16 |
17 | CMD java -Xms256m -Xmx256m -Xss256k -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar XHuiCloud-register.jar
18 |
19 |
20 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/java/com/alibaba/nacos/utils/PasswordEncoderUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2018 Alibaba Group Holding Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.alibaba.nacos.utils;
18 |
19 | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
20 |
21 | /**
22 | * Password encoder tool.
23 | *
24 | * @author nacos
25 | */
26 | public class PasswordEncoderUtil {
27 |
28 | public static Boolean matches(String raw, String encoded) {
29 | return new BCryptPasswordEncoder().matches(raw, encoded);
30 | }
31 |
32 | public static String encode(String raw) {
33 | return new BCryptPasswordEncoder().encode(raw);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | boot: # spring-boot admin 配置
3 | admin:
4 | client:
5 | url: http://xhuicloud-monitor:9090
6 | datasource:
7 | platform: mysql
8 | security:
9 | enabled: true
10 | application:
11 | name: @project.artifactId@
12 |
13 | db:
14 | num: 1
15 | user: ${MYSQL_USER:root}
16 | password: ${MYSQL_PASSWORD:root}
17 | url:
18 | 0: jdbc:mysql://${MYSQL_HOST:xhuicloud-mysql}:${MYSQL_PORT:3306}/xhuicloud_register?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&allowMultiQueries=true&allowPublicKeyRetrieval=true
19 |
20 | nacos:
21 | core:
22 | auth:
23 | system.type: nacos
24 | default.token.secret.key: SecretKey012345678901234567890123456789012345678901234567890123456789
25 | security:
26 | ignore:
27 | urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
28 |
29 | useAddressServer: true
30 |
31 | management:
32 | endpoints:
33 | web:
34 | exposure:
35 | include: '*'
36 | metrics:
37 | export:
38 | influx:
39 | enabled: false
40 | elastic:
41 | enabled: false
42 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/aliyun-console-font.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/aliyun-console-font.eot
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/aliyun-console-font.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/aliyun-console-font.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/aliyun-console-font.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/aliyun-console-font.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/font_515771_emcns5054x3whfr.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/font_515771_emcns5054x3whfr.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/font_515771_emcns5054x3whfr.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/font_515771_emcns5054x3whfr.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/roboto-bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/roboto-bold.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/roboto-bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/roboto-bold.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/roboto-bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/roboto-bold.woff2
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/roboto-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/roboto-regular.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/roboto-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/roboto-regular.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/roboto-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/css/fonts/roboto-regular.woff2
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-bold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-bold.eot
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-bold.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-bold.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-bold.woff2
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-light.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-light.eot
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-light.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-light.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-light.woff2
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-medium.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-medium.eot
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-medium.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-medium.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-medium.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-medium.woff2
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-regular.eot
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-regular.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-regular.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-regular.woff2
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-thin.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-thin.eot
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-thin.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-thin.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-thin.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-thin.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/fonts/roboto-thin.woff2
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/icons/icon-font.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/icons/icon-font.eot
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/icons/icon-font.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/icons/icon-font.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/icons/icon-font.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/icons/icon-font.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/icons/icon-font.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/icons/icon-font.woff2
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/img/black_dot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/img/black_dot.png
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/img/favicon.ico
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/img/nacos-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/img/nacos-logo.png
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/img/nacos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/console-ui/public/img/nacos.png
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/img/black_dot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/img/black_dot.png
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/img/nacos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-register/src/main/resources/static/img/nacos.png
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre
2 |
3 | MAINTAINER Sinda(sindazeng@gmail.com)
4 |
5 | ENV TZ=Asia/Shanghai
6 |
7 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
8 |
9 | RUN mkdir -p /XHuiCloud-seata
10 |
11 | WORKDIR /XHuiCloud-seata
12 |
13 | EXPOSE 8091
14 |
15 | ADD ./target/XHuiCloud-seata.jar ./
16 |
17 | CMD java -Xms256m -Xmx256m -Xss256k -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar XHuiCloud-seata.jar
18 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/src/main/java/io/seata/server/coordinator/TransactionCoordinatorInbound.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2019 Seata.io Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.seata.server.coordinator;
17 |
18 | import io.seata.core.model.ResourceManagerOutbound;
19 | import io.seata.core.model.TransactionManager;
20 |
21 | /**
22 | * receive inbound request from RM or TM.
23 | *
24 | * @author zhangchenghui.dev@gmail.com
25 | * @since 1.1.0
26 | */
27 | public interface TransactionCoordinatorInbound extends ResourceManagerOutbound, TransactionManager {
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/src/main/java/io/seata/server/event/EventBusManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2019 Seata.io Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.seata.server.event;
17 |
18 | import io.seata.core.event.EventBus;
19 | import io.seata.core.event.GuavaEventBus;
20 |
21 | /**
22 | * Manager hold the singleton event bus instance.
23 | *
24 | * @author zhengyangyong
25 | */
26 | public class EventBusManager {
27 | private static class SingletonHolder {
28 | private static EventBus INSTANCE = new GuavaEventBus("tc");
29 | }
30 |
31 | public static EventBus get() {
32 | return SingletonHolder.INSTANCE;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/src/main/java/io/seata/server/logging/logback/ansi/AnsiElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2019 Seata.io Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.seata.server.logging.logback.ansi;
17 |
18 | /**
19 | * An ANSI encodable element.
20 | *
21 | * @author Phillip Webb
22 | * @origin Copied from spring-boot.jar by wang.liang
23 | */
24 | public interface AnsiElement {
25 |
26 | /**
27 | * @return the ANSI escape code
28 | */
29 | @Override
30 | String toString();
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/src/main/java/io/seata/server/session/GlobalSessionHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2019 Seata.io Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.seata.server.session;
17 |
18 | import io.seata.core.exception.TransactionException;
19 |
20 | /**
21 | * The Functional Interface Global session handler
22 | *
23 | * @author wang.liang
24 | * @since 1.5.0
25 | */
26 | @FunctionalInterface
27 | public interface GlobalSessionHandler {
28 |
29 | /**
30 | * Handle global session.
31 | *
32 | * @param globalSession the global session
33 | * @throws TransactionException the transaction exception
34 | */
35 | void handle(GlobalSession globalSession) throws TransactionException;
36 | }
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/src/main/java/io/seata/server/session/Reloadable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2019 Seata.io Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.seata.server.session;
17 |
18 | /**
19 | * Service contains states which can be reloaded.
20 | *
21 | * @author sharajava
22 | */
23 | public interface Reloadable {
24 |
25 | /**
26 | * Reload states.
27 | */
28 | void reload();
29 | }
30 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/src/main/java/io/seata/server/store/SessionStorable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2019 Seata.io Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.seata.server.store;
17 |
18 | /**
19 | * The interface Session storable.
20 | *
21 | * @author slievrly
22 | */
23 | public interface SessionStorable {
24 |
25 | /**
26 | * Encode byte [ ].
27 | *
28 | * @return the byte [ ]
29 | */
30 | byte[] encode();
31 |
32 | /**
33 | * Decode.
34 | *
35 | * @param src the src
36 | */
37 | void decode(byte[] src);
38 | }
39 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/src/main/java/io/seata/server/transaction/tcc/TccCore.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2019 Seata.io Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.seata.server.transaction.tcc;
17 |
18 | import io.seata.core.model.BranchType;
19 | import io.seata.core.rpc.RemotingServer;
20 | import io.seata.server.coordinator.AbstractCore;
21 |
22 | /**
23 | * The type tcc core.
24 | *
25 | * @author ph3636
26 | */
27 | public class TccCore extends AbstractCore {
28 |
29 | public TccCore(RemotingServer remotingServer) {
30 | super(remotingServer);
31 | }
32 |
33 | @Override
34 | public BranchType getHandleBranchType() {
35 | return BranchType.TCC;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/src/main/resources/META-INF/services/io.seata.core.rpc.RegisterCheckAuthHandler:
--------------------------------------------------------------------------------
1 | io.seata.server.auth.DefaultCheckAuthHandler
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/src/main/resources/META-INF/services/io.seata.core.store.db.DataSourceProvider:
--------------------------------------------------------------------------------
1 | io.seata.server.store.DbcpDataSourceProvider
2 | io.seata.server.store.DruidDataSourceProvider
3 | io.seata.server.store.HikariDataSourceProvider
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/src/main/resources/META-INF/services/io.seata.server.coordinator.AbstractCore:
--------------------------------------------------------------------------------
1 | io.seata.server.transaction.at.ATCore
2 | io.seata.server.transaction.tcc.TccCore
3 | io.seata.server.transaction.saga.SagaCore
4 | io.seata.server.transaction.xa.XACore
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/src/main/resources/META-INF/services/io.seata.server.lock.LockManager:
--------------------------------------------------------------------------------
1 | io.seata.server.storage.db.lock.DataBaseLockManager
2 | io.seata.server.storage.file.lock.FileLockManager
3 | io.seata.server.storage.redis.lock.RedisLockManager
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-seata/src/main/resources/META-INF/services/io.seata.server.session.SessionManager:
--------------------------------------------------------------------------------
1 | io.seata.server.storage.file.session.FileSessionManager
2 | io.seata.server.storage.db.session.DataBaseSessionManager
3 | io.seata.server.storage.redis.session.RedisSessionManager
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre
2 |
3 | MAINTAINER Sinda(sindazeng@gmail.com)
4 |
5 | ENV TZ=Asia/Shanghai
6 |
7 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
8 |
9 | RUN mkdir -p /XHuiCloud-sentinel-dashboard
10 |
11 | WORKDIR /XHuiCloud-sentinel-dashboard
12 |
13 | EXPOSE 10101
14 |
15 | ADD ./target/XHuiCloud-sentinel-dashboard.jar ./
16 |
17 | CMD java -Xms256m -Xmx256m -Xss256k -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar XHuiCloud-sentinel-dashboard.jar
18 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/auth/AuthorizationInterceptor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2018 Alibaba Group Holding Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.csp.sentinel.dashboard.auth;
17 |
18 | import org.springframework.web.servlet.HandlerInterceptor;
19 |
20 | /**
21 | * The web interceptor for privilege-based authorization.
22 | *
23 | * @author lkxiaolou
24 | * @author wxq
25 | * @since 1.7.1
26 | */
27 | public interface AuthorizationInterceptor extends HandlerInterceptor {
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/client/CommandFailedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2018 Alibaba Group Holding Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.csp.sentinel.dashboard.client;
17 |
18 | /**
19 | * @author Eric Zhao
20 | */
21 | public class CommandFailedException extends RuntimeException {
22 |
23 | public CommandFailedException() {}
24 |
25 | public CommandFailedException(String message) {
26 | super(message);
27 | }
28 |
29 | @Override
30 | public synchronized Throwable fillInStackTrace() {
31 | return this;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/client/CommandNotFoundException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2018 Alibaba Group Holding Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.csp.sentinel.dashboard.client;
17 |
18 | /**
19 | * @author Eric Zhao
20 | * @since 0.2.1
21 | */
22 | public class CommandNotFoundException extends Exception {
23 |
24 | public CommandNotFoundException() { }
25 |
26 | public CommandNotFoundException(String message) {
27 | super(message);
28 | }
29 |
30 | @Override
31 | public synchronized Throwable fillInStackTrace() {
32 | return this;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/config/AuthProperties.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2018 Alibaba Group Holding Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.csp.sentinel.dashboard.config;
17 |
18 | import org.springframework.boot.context.properties.ConfigurationProperties;
19 |
20 | @ConfigurationProperties(prefix = "auth")
21 | public class AuthProperties {
22 |
23 | private boolean enabled = true;
24 |
25 | public boolean isEnabled() {
26 | return enabled;
27 | }
28 |
29 | public void setEnabled(boolean enabled) {
30 | this.enabled = enabled;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/datasource/entity/rule/RuleEntity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2018 Alibaba Group Holding Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.csp.sentinel.dashboard.datasource.entity.rule;
17 |
18 | import com.alibaba.csp.sentinel.slots.block.Rule;
19 |
20 | import java.util.Date;
21 |
22 | /**
23 | * @author leyou
24 | */
25 | public interface RuleEntity {
26 |
27 | Long getId();
28 |
29 | void setId(Long id);
30 |
31 | String getApp();
32 |
33 | String getIp();
34 |
35 | Integer getPort();
36 |
37 | Date getGmtCreate();
38 |
39 | Rule toRule();
40 | }
41 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/domain/cluster/request/ClusterModifyRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2018 Alibaba Group Holding Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.csp.sentinel.dashboard.domain.cluster.request;
17 |
18 | /**
19 | * @author Eric Zhao
20 | * @since 1.4.0
21 | */
22 | public interface ClusterModifyRequest {
23 |
24 | String getApp();
25 |
26 | String getIp();
27 |
28 | Integer getPort();
29 |
30 | Integer getMode();
31 | }
32 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/DynamicRuleProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2018 Alibaba Group Holding Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.csp.sentinel.dashboard.rule;
17 |
18 | /**
19 | * @author Eric Zhao
20 | * @since 1.4.0
21 | */
22 | public interface DynamicRuleProvider {
23 |
24 | T getRules(String appName) throws Exception;
25 | }
26 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/DynamicRulePublisher.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2018 Alibaba Group Holding Ltd.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.csp.sentinel.dashboard.rule;
17 |
18 | /**
19 | * @author Eric Zhao
20 | * @since 1.4.0
21 | */
22 | public interface DynamicRulePublisher {
23 |
24 | /**
25 | * Publish rules to remote rule configuration center for given application name.
26 | *
27 | * @param app app name
28 | * @param rules list of rules to push
29 | * @throws Exception if some error occurs
30 | */
31 | void publish(String app, T rules) throws Exception;
32 | }
33 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | tmp/
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/README.md:
--------------------------------------------------------------------------------
1 | # Sentinel Dashboard Frontend
2 |
3 | ## Env Requirement
4 |
5 | - Node.js > 6.x
6 |
7 | ## Code Guide
8 |
9 | - [Code Style Guide for HTML/CSS](https://codeguide.bootcss.com/)
10 | - [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript/tree/es5-deprecated/es5)
11 |
12 | ## Install Packages
13 |
14 | ```
15 | npm install
16 | ```
17 |
18 | ## Start Development
19 |
20 | ```
21 | npm start
22 | ```
23 |
24 | ## Build for production
25 |
26 | ```
27 | npm run build
28 | ```
29 |
30 | ## Credit
31 |
32 | - [sb-admin-angular](https://github.com/start-angular/sb-admin-angular)
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/README_zh.md:
--------------------------------------------------------------------------------
1 | # Sentinel Dashboard Frontend
2 |
3 | ## 环境要求
4 |
5 | - Node.js > 6.x
6 |
7 | ## 编码规范
8 |
9 | - HTML/CSS 遵循 [Bootstrap 编码规范](https://codeguide.bootcss.com/)
10 | - JavaScript 遵循 [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript/tree/es5-deprecated/es5) 以及最新的 ES 6 标准
11 |
12 | ## 安装依赖
13 |
14 | ```
15 | npm i
16 | ```
17 |
18 | ## 开始本地开发
19 |
20 | ```
21 | npm start
22 | ```
23 |
24 | ## 构建前端资源
25 |
26 | ```
27 | npm run build
28 | ```
29 |
30 | ## Credit
31 |
32 | - [sb-admin-angular](https://github.com/start-angular/sb-admin-angular)
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/controllers/home.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc function
3 | * @name sentinelDashboardApp.controller:MainCtrl
4 | * @description
5 | * # MainCtrl
6 | * Controller of the sentinelDashboardApp
7 | */
8 | angular.module('sentinelDashboardApp')
9 | .controller('HomeCtrl', ['$scope', '$position', function ($scope, $position) {
10 | // do noting
11 | }]);
12 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/controllers/login.js:
--------------------------------------------------------------------------------
1 | var app = angular.module('sentinelDashboardApp');
2 |
3 | app.controller('LoginCtl', ['$scope', '$state', '$window', 'AuthService',
4 | function ($scope, $state, $window, AuthService) {
5 | // If auth passed, jump to the index page directly
6 | if ($window.localStorage.getItem('session_sentinel_admin')) {
7 | $state.go('dashboard');
8 | }
9 |
10 | $scope.login = function () {
11 | if (!$scope.username) {
12 | alert('请输入用户名');
13 | return;
14 | }
15 |
16 | if (!$scope.password) {
17 | alert('请输入密码');
18 | return;
19 | }
20 |
21 | var param = {"username": $scope.username, "password": $scope.password};
22 |
23 | AuthService.login(param).success(function (data) {
24 | if (data.code == 0) {
25 | $window.localStorage.setItem('session_sentinel_admin', JSON.stringify(data.data));
26 | $state.go('dashboard');
27 | } else {
28 | alert(data.msg);
29 | }
30 | });
31 | };
32 | }]
33 | );
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/controllers/main.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc function
3 | * @name sentinelDashboardApp.controller:MainCtrl
4 | * @description
5 | * # MainCtrl
6 | * Controller of the sentinelDashboardApp
7 | */
8 | angular.module('sentinelDashboardApp')
9 | .controller('DashboardCtrl', ['$scope', '$position', function ($scope, $position) {
10 | }]);
11 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/header/header.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/sidebar/sidebar-search/sidebar-search.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/sidebar/sidebar-search/sidebar-search.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc directive
3 | * @name izzyposWebApp.directive:adminPosHeader
4 | * @description
5 | * # adminPosHeader
6 | */
7 |
8 | angular.module('sentinelDashboardApp')
9 | .directive('sidebarSearch', function () {
10 | return {
11 | templateUrl: 'app/scripts/directives/sidebar/sidebar-search/sidebar-search.html',
12 | restrict: 'E',
13 | replace: true,
14 | scope: {
15 | },
16 | controller: function ($scope) {
17 | $scope.selectedMenu = 'home';
18 | }
19 | }
20 | });
21 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/filters/filters.js:
--------------------------------------------------------------------------------
1 | var app = angular.module('sentinelDashboardApp');
2 |
3 | app.filter('range', [function () {
4 | return function (input, length) {
5 | if (isNaN(length) || length <= 0) {
6 | return [];
7 | }
8 |
9 | input = [];
10 | for (var index = 1; index <= length; index++) {
11 | input.push(index);
12 | }
13 |
14 | return input;
15 | };
16 |
17 | }]);
18 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/services/appservice.js:
--------------------------------------------------------------------------------
1 |
2 | var app = angular.module('sentinelDashboardApp');
3 |
4 | app.service('AppService', ['$http', function ($http) {
5 | this.getApps = function () {
6 | return $http({
7 | // url: 'app/mock_infos',
8 | url: 'app/briefinfos.json',
9 | method: 'GET'
10 | });
11 | };
12 | }]);
13 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/services/auth_service.js:
--------------------------------------------------------------------------------
1 | var app = angular.module('sentinelDashboardApp');
2 |
3 | app.service('AuthService', ['$http', function ($http) {
4 | this.check = function () {
5 | return $http({
6 | url: '/auth/check',
7 | method: 'POST'
8 | });
9 | };
10 |
11 | this.login = function (param) {
12 | return $http({
13 | url: '/auth/login',
14 | params: param,
15 | method: 'POST'
16 | });
17 | };
18 |
19 | this.logout = function () {
20 | return $http({
21 | url: '/auth/logout',
22 | method: 'POST'
23 | });
24 | };
25 | }]);
26 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/services/identityservice.js:
--------------------------------------------------------------------------------
1 | var app = angular.module('sentinelDashboardApp');
2 |
3 | app.service('IdentityService', ['$http', function ($http) {
4 |
5 | this.fetchIdentityOfMachine = function (ip, port, searchKey) {
6 | var param = {
7 | ip: ip,
8 | port: port,
9 | searchKey: searchKey
10 | };
11 | return $http({
12 | url: 'resource/machineResource.json',
13 | params: param,
14 | method: 'GET'
15 | });
16 | };
17 | this.fetchClusterNodeOfMachine = function (ip, port, searchKey) {
18 | var param = {
19 | ip: ip,
20 | port: port,
21 | type: 'cluster',
22 | searchKey: searchKey
23 | };
24 | return $http({
25 | url: 'resource/machineResource.json',
26 | params: param,
27 | method: 'GET'
28 | });
29 | };
30 | }]);
31 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/services/machineservice.js:
--------------------------------------------------------------------------------
1 | var app = angular.module('sentinelDashboardApp');
2 |
3 | app.service('MachineService', ['$http', '$httpParamSerializerJQLike',
4 | function ($http, $httpParamSerializerJQLike) {
5 | this.getAppMachines = function (app) {
6 | return $http({
7 | url: 'app/' + app + '/machines.json',
8 | method: 'GET'
9 | });
10 | };
11 | this.removeAppMachine = function (app, ip, port) {
12 | return $http({
13 | url: 'app/' + app + '/machine/remove.json',
14 | method: 'POST',
15 | headers: {
16 | 'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
17 | },
18 | data: $httpParamSerializerJQLike({
19 | ip: ip,
20 | port: port
21 | })
22 | });
23 | };
24 | }]
25 | );
26 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/services/metricservice.js:
--------------------------------------------------------------------------------
1 | var app = angular.module('sentinelDashboardApp');
2 |
3 | app.service('MetricService', ['$http', function ($http) {
4 |
5 | this.queryAppSortedIdentities = function (params) {
6 | return $http({
7 | url: '/metric/queryTopResourceMetric.json',
8 | params: params,
9 | method: 'GET'
10 | });
11 | };
12 |
13 | this.queryByAppAndIdentity = function (params) {
14 | return $http({
15 | url: '/metric/queryByAppAndResource.json',
16 | params: params,
17 | method: 'GET'
18 | });
19 | };
20 |
21 | this.queryByMachineAndIdentity = function (ip, port, identity, startTime, endTime) {
22 | var param = {
23 | ip: ip,
24 | port: port,
25 | identity: identity,
26 | startTime: startTime.getTime(),
27 | endTime: endTime.getTime()
28 | };
29 |
30 | return $http({
31 | url: '/metric/queryByAppAndResource.json',
32 | params: param,
33 | method: 'GET'
34 | });
35 | };
36 | }]);
37 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/scripts/services/version_service.js:
--------------------------------------------------------------------------------
1 | var app = angular.module('sentinelDashboardApp');
2 |
3 | app.service('VersionService', ['$http', function ($http) {
4 | this.version = function () {
5 | return $http({
6 | url: '/version',
7 | method: 'GET'
8 | });
9 | };
10 | }]);
11 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/views/dashboard/home.html:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/views/dashboard/main.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/views/dialog/confirm-dialog.html:
--------------------------------------------------------------------------------
1 |
2 |
{{confirmDialog.title}}
3 |
4 |
5 |
6 |
7 | {{confirmDialog.attentionTitle}}:
8 |
9 |
10 | {{confirmDialog.attention}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/app/views/pagination.tpl.html:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/assets/img/sentinel-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/assets/img/sentinel-logo.png
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/index.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Sentinel Dashboard
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/index_dev.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Sentinel 控制台
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/lib/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/lib/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/lib/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/lib/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/lib/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/lib/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/lib/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/lib/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/lib/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/lib/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/license-stat.csv:
--------------------------------------------------------------------------------
1 | Type,Package,License
2 | npm,angular,MIT License
3 | npm,angular-animate,MIT License
4 | npm,angular-bootstrap,MIT License
5 | npm,angular-clipboard,MIT License
6 | npm,angular-cookies,MIT License
7 | npm,angular-date-time-input,MIT License
8 | npm,angular-loading-bar,MIT License
9 | npm,angular-mocks,MIT License
10 | npm,angular-resource,MIT License
11 | npm,angular-route,MIT License
12 | npm,angular-selectize2,MIT License
13 | npm,angular-table-resize,MIT License
14 | npm,angular-touch,MIT License
15 | npm,angular-ui-notification,MIT License
16 | npm,angular-ui-router,MIT License
17 | npm,angular-utils-pagination,MIT License
18 | npm,angularjs-bootstrap-datetimepicker,MIT License
19 | npm,bootstrap-switch,Apache License 2.0
20 | npm,bootstrap-tagsinput,MIT License
21 | npm,moment,MIT License
22 | npm,ng-dialog,MIT License
23 | npm,ng-tags-input,MIT License
24 | npm,oclazyload,MIT License
25 | npm,selectize,Apache License 2.0
26 | lib,jsTreeTable,MIT License
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-sentinel-dashboard/src/main/webapp/resources/static/favicon.ico
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-wechat/XHuiCloud-wechat-api/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | XHuiCloud-wechat
7 | com.xhuicloud
8 | ${revision}
9 |
10 | 4.0.0
11 | jar
12 | XHuiCloud-wechat-api
13 |
14 |
15 | com.baomidou
16 | mybatis-plus-extension
17 |
18 |
19 |
20 | ${project.groupId}
21 | XHuiCloud-common-feign
22 |
23 |
24 |
25 | ${project.groupId}
26 | XHuiCloud-common-core
27 |
28 |
29 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-wechat/XHuiCloud-wechat-api/src/main/java/com/xhuicloud/wechat/feign/WeChatAccountFeign.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.wechat.feign;
2 |
3 | import com.xhuicloud.common.core.constant.ServiceNameConstants;
4 | import org.springframework.cloud.openfeign.FeignClient;
5 |
6 | /**
7 | * @Desc
8 | * @Author Sinda
9 | * @Date 2022/11/7
10 | */
11 | @FeignClient(contextId = WeChatAccountFeign.WECHATACCOUNTFEIGN, value = ServiceNameConstants.XHUICLOUD_WECHAT_SERVICE, path = "/account")
12 | public interface WeChatAccountFeign {
13 |
14 | String WECHATACCOUNTFEIGN = "weChatAccountFeign";
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-wechat/XHuiCloud-wechat-api/src/main/java/com/xhuicloud/wechat/vo/WeChatAccountVo.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.wechat.vo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | /**
7 | * @Desc
8 | * @Author Sinda
9 | * @Date 2023/1/11
10 | */
11 | @Data
12 | public class WeChatAccountVo {
13 |
14 | @ApiModelProperty(value = "公众号名称")
15 | private String name;
16 |
17 | @ApiModelProperty(value = "公众号头像")
18 | private String url;
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-wechat/XHuiCloud-wechat-api/src/main/java/com/xhuicloud/wechat/vo/WeChatSummaryVo.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.wechat.vo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | /**
7 | * @Desc
8 | * @Author Sinda
9 | * @Date 2022/11/9
10 | */
11 | @Data
12 | public class WeChatSummaryVo {
13 |
14 | @ApiModelProperty(value = "公众号名称")
15 | private String name;
16 |
17 | @ApiModelProperty(value = "公众号AppId")
18 | private String appId;
19 |
20 | @ApiModelProperty(value = "新增的用户数量")
21 | private Integer newUser;
22 |
23 | @ApiModelProperty(value = "取消关注的用户数量")
24 | private Integer cancelUser;
25 |
26 | @ApiModelProperty(value = "合计用户数量")
27 | private Integer totalUser;
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-wechat/XHuiCloud-wechat-service/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre
2 |
3 | MAINTAINER Sinda(sindazeng@gmail.com)
4 |
5 | ENV TZ=Asia/Shanghai
6 |
7 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
8 |
9 | RUN mkdir -p /XHuiCloud-wechat-service
10 |
11 | WORKDIR /XHuiCloud-wechat-service
12 |
13 | EXPOSE 24000
14 |
15 | ADD ./target/XHuiCloud-wechat-service.jar ./
16 |
17 | CMD java -Xms512m -Xmx512m -Xss256k -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar XHuiCloud-wechat-service.jar
18 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-wechat/XHuiCloud-wechat-service/src/main/java/com/xhuicloud/wechat/XHuiWechatApplication.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.wechat;
2 |
3 | import com.xhuicloud.common.authorization.resource.annotation.EnableResourceServer;
4 | import com.xhuicloud.common.feign.annotation.EnableXHuiFeignClients;
5 | import com.xhuicloud.common.log.annotation.EnableAudit;
6 | import com.xhuicloud.common.swagger.annotation.EnableXHuiSwagger;
7 | import org.springframework.boot.SpringApplication;
8 | import org.springframework.boot.autoconfigure.SpringBootApplication;
9 |
10 | /**
11 | * @Desc
12 | * @Author Sinda
13 | * @Date 2022/11/4
14 | */
15 | @EnableAudit
16 | @EnableXHuiSwagger
17 | @SpringBootApplication
18 | @EnableXHuiFeignClients
19 | @EnableResourceServer
20 | public class XHuiWechatApplication {
21 | public static void main(String[] args) {
22 | SpringApplication.run(XHuiWechatApplication.class, args);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-wechat/XHuiCloud-wechat-service/src/main/java/com/xhuicloud/wechat/config/WeChatAppIdContextHolder.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.wechat.config;
2 |
3 | import com.alibaba.ttl.TransmittableThreadLocal;
4 | import lombok.experimental.UtilityClass;
5 |
6 | /**
7 | * @Desc
8 | * @Author Sinda
9 | * @Date 2022/11/12
10 | */
11 | @UtilityClass
12 | public class WeChatAppIdContextHolder {
13 |
14 | private final ThreadLocal APPID = new TransmittableThreadLocal<>();
15 |
16 |
17 | public void setAppId(String appId) {
18 | APPID.set(appId);
19 | }
20 |
21 | public String getAppId() {
22 | return APPID.get();
23 | }
24 |
25 | public void remove() {
26 | APPID.remove();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-wechat/XHuiCloud-wechat-service/src/main/java/com/xhuicloud/wechat/config/WeChatExceptionHandlerResolver.java:
--------------------------------------------------------------------------------
1 | package com.xhuicloud.wechat.config;
2 |
3 | import com.xhuicloud.common.authorization.resource.component.GlobalExceptionHandlerResolver;
4 | import com.xhuicloud.common.core.utils.Response;
5 | import lombok.extern.slf4j.Slf4j;
6 | import me.chanjar.weixin.common.error.WxErrorException;
7 | import org.springframework.http.HttpStatus;
8 | import org.springframework.web.bind.annotation.ExceptionHandler;
9 | import org.springframework.web.bind.annotation.ResponseStatus;
10 | import org.springframework.web.bind.annotation.RestControllerAdvice;
11 |
12 | /**
13 | * @Desc
14 | * @Author Sinda
15 | * @Date 2022/11/22
16 | */
17 | @Slf4j
18 | @RestControllerAdvice
19 | public class WeChatExceptionHandlerResolver extends GlobalExceptionHandlerResolver {
20 |
21 | /**
22 | * 微信异常.
23 | *
24 | * @param e the e
25 | * @return R
26 | */
27 | @ExceptionHandler(WxErrorException.class)
28 | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
29 | public Response handleGlobalException(WxErrorException e) {
30 | log.error("微信异常 ex={}", e.getMessage(), e);
31 | return Response.failed(e.getError().getErrorMsg());
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-wechat/XHuiCloud-wechat-service/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: @artifactId@
4 | profiles:
5 | active: @profiles.active@
6 | cloud:
7 | nacos:
8 | discovery:
9 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
10 | config:
11 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
12 | config:
13 | import:
14 | - optional:nacos:application-common-@profiles.active@.yml
15 | - optional:nacos:xhuicloud-common-@profiles.active@.yml
16 | - optional:nacos:@artifactId@-@profiles.active@.yml
17 | servlet:
18 | multipart:
19 | # 根据实际需求作调整
20 | # 默认最大上传文件大小为1M,单个文件大小
21 | max-file-size: 200MB
22 | # 默认最大请求大小为10M,总上传的数据大小
23 | max-request-size: 200MB
24 | mysql:
25 | scheme: xhuicloud_wechat
26 |
27 | server:
28 | port: 24000
29 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-wechat/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | XHuiCloud-business
7 | com.xhuicloud
8 | ${revision}
9 |
10 | 4.0.0
11 | XHuiCloud-wechat
12 | pom
13 |
14 | XHuiCloud-wechat-api
15 | XHuiCloud-wechat-service
16 |
17 |
18 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-api/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | XHuiCloud-xxl-admin
7 | com.xhuicloud
8 | ${revision}
9 |
10 | 4.0.0
11 | jar
12 | XHuiCloud-xxl-admin-api
13 |
14 |
15 |
16 |
17 | ${project.groupId}
18 | XHuiCloud-common-feign
19 |
20 |
21 |
22 | com.xhuicloud
23 | XHuiCloud-common-core
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-api/src/main/java/com/xxl/job/admin/api/entity/XxlJobLogReport.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.api.entity;
2 |
3 | import java.util.Date;
4 |
5 | public class XxlJobLogReport {
6 |
7 | private int id;
8 |
9 | private Date triggerDay;
10 |
11 | private int runningCount;
12 |
13 | private int sucCount;
14 |
15 | private int failCount;
16 |
17 | public int getId() {
18 | return id;
19 | }
20 |
21 | public void setId(int id) {
22 | this.id = id;
23 | }
24 |
25 | public Date getTriggerDay() {
26 | return triggerDay;
27 | }
28 |
29 | public void setTriggerDay(Date triggerDay) {
30 | this.triggerDay = triggerDay;
31 | }
32 |
33 | public int getRunningCount() {
34 | return runningCount;
35 | }
36 |
37 | public void setRunningCount(int runningCount) {
38 | this.runningCount = runningCount;
39 | }
40 |
41 | public int getSucCount() {
42 | return sucCount;
43 | }
44 |
45 | public void setSucCount(int sucCount) {
46 | this.sucCount = sucCount;
47 | }
48 |
49 | public int getFailCount() {
50 | return failCount;
51 | }
52 |
53 | public void setFailCount(int failCount) {
54 | this.failCount = failCount;
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-api/src/main/java/com/xxl/job/admin/api/entity/XxlJobRegistry.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.api.entity;
2 |
3 | import java.util.Date;
4 |
5 | /**
6 | * Created by xuxueli on 16/9/30.
7 | */
8 | public class XxlJobRegistry {
9 |
10 | private int id;
11 |
12 | private String registryGroup;
13 |
14 | private String registryKey;
15 |
16 | private String registryValue;
17 |
18 | private Date updateTime;
19 |
20 | public int getId() {
21 | return id;
22 | }
23 |
24 | public void setId(int id) {
25 | this.id = id;
26 | }
27 |
28 | public String getRegistryGroup() {
29 | return registryGroup;
30 | }
31 |
32 | public void setRegistryGroup(String registryGroup) {
33 | this.registryGroup = registryGroup;
34 | }
35 |
36 | public String getRegistryKey() {
37 | return registryKey;
38 | }
39 |
40 | public void setRegistryKey(String registryKey) {
41 | this.registryKey = registryKey;
42 | }
43 |
44 | public String getRegistryValue() {
45 | return registryValue;
46 | }
47 |
48 | public void setRegistryValue(String registryValue) {
49 | this.registryValue = registryValue;
50 | }
51 |
52 | public Date getUpdateTime() {
53 | return updateTime;
54 | }
55 |
56 | public void setUpdateTime(Date updateTime) {
57 | this.updateTime = updateTime;
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-api/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | com.xxl.job.admin.api.AutoConfiguration
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre
2 |
3 | MAINTAINER Sinda(sindazeng@gmail.com)
4 |
5 | ENV TZ=Asia/Shanghai
6 |
7 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
8 |
9 | RUN mkdir -p /XHuiCloud-xxl-admin-service
10 |
11 | WORKDIR /XHuiCloud-xxl-admin-service
12 |
13 | EXPOSE 20000
14 |
15 | ADD ./target/XHuiCloud-xxl-admin-service.jar ./
16 |
17 | CMD java -Xms256m -Xmx256m -Xss256k -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar XHuiCloud-xxl-admin-service.jar
18 |
19 |
20 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/XHuiXxlJobAdminApplication.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
6 |
7 | @SpringBootApplication
8 | @EnableDiscoveryClient
9 | public class XHuiXxlJobAdminApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(XHuiXxlJobAdminApplication.class, args);
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/controller/annotation/PermissionLimit.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.controller.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * 权限限制
10 | * @author xuxueli 2015-12-12 18:29:02
11 | */
12 | @Target(ElementType.METHOD)
13 | @Retention(RetentionPolicy.RUNTIME)
14 | public @interface PermissionLimit {
15 |
16 | /**
17 | * 登录拦截 (默认拦截)
18 | */
19 | boolean limit() default true;
20 |
21 | /**
22 | * 要求管理员权限
23 | * @return
24 | */
25 | boolean adminuser() default false;
26 |
27 | }
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/controller/interceptor/WebMvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.controller.interceptor;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
6 |
7 | import javax.annotation.Resource;
8 |
9 | /**
10 | * web mvc config
11 | *
12 | * @author xuxueli 2018-04-02 20:48:20
13 | */
14 | @Configuration
15 | public class WebMvcConfig implements WebMvcConfigurer {
16 |
17 | @Resource
18 | private PermissionInterceptor permissionInterceptor;
19 |
20 | @Resource
21 | private CookieInterceptor cookieInterceptor;
22 |
23 | @Override
24 | public void addInterceptors(InterceptorRegistry registry) {
25 | registry.addInterceptor(permissionInterceptor).addPathPatterns("/**");
26 | registry.addInterceptor(cookieInterceptor).addPathPatterns("/**");
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/core/alarm/JobAlarm.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.core.alarm;
2 |
3 | import com.xxl.job.admin.api.entity.XxlJobInfo;
4 | import com.xxl.job.admin.api.entity.XxlJobLog;
5 |
6 | /**
7 | * @author xuxueli 2020-01-19
8 | */
9 | public interface JobAlarm {
10 |
11 | /**
12 | * job alarm
13 | * @param info
14 | * @param jobLog
15 | * @return
16 | */
17 | public boolean doAlarm(XxlJobInfo info, XxlJobLog jobLog);
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/core/exception/XxlJobException.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.core.exception;
2 |
3 | /**
4 | * @author xuxueli 2019-05-04 23:19:29
5 | */
6 | public class XxlJobException extends RuntimeException {
7 |
8 | public XxlJobException() {
9 | }
10 |
11 | public XxlJobException(String message) {
12 | super(message);
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/core/old/RemoteHttpJobBean.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.core.old;// package com.xxl.job.admin.core.jobbean;
2 | //
3 | // import com.xxl.job.admin.core.thread.JobTriggerPoolHelper;
4 | // import com.xxl.job.admin.core.trigger.TriggerTypeEnum;
5 | // import org.quartz.JobExecutionContext;
6 | // import org.quartz.JobExecutionException;
7 | // import org.quartz.JobKey;
8 | // import org.slf4j.Logger;
9 | // import org.slf4j.LoggerFactory;
10 | // import org.springframework.scheduling.quartz.QuartzJobBean;
11 | //
12 | /// **
13 | // * http job bean
14 | // * “@DisallowConcurrentExecution” disable concurrent, thread size can not be only one,
15 | // better given more
16 | // * @author xuxueli 2015-12-17 18:20:34
17 | // */
18 | //// @DisallowConcurrentExecution
19 | // public class RemoteHttpJobBean extends QuartzJobBean {
20 | // private static Logger logger = LoggerFactory.getLogger(RemoteHttpJobBean.class);
21 | //
22 | // @Override
23 | // protected void executeInternal(JobExecutionContext context)
24 | // throws JobExecutionException {
25 | //
26 | // // load jobId
27 | // JobKey jobKey = context.getTrigger().getJobKey();
28 | // Integer jobId = Integer.valueOf(jobKey.getName());
29 | //
30 | //
31 | // }
32 | //
33 | // }
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/core/old/XxlJobThreadPool.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.core.old;// package com.xxl.job.admin.core.quartz;
2 | //
3 | // import org.quartz.SchedulerConfigException;
4 | // import org.quartz.spi.ThreadPool;
5 | //
6 | /// **
7 | // * single thread pool, for async trigger
8 | // *
9 | // * @author xuxueli 2019-03-06
10 | // */
11 | // public class XxlJobThreadPool implements ThreadPool {
12 | //
13 | // @Override
14 | // public boolean runInThread(Runnable runnable) {
15 | //
16 | // // async run
17 | // runnable.run();
18 | // return true;
19 | //
20 | // //return false;
21 | // }
22 | //
23 | // @Override
24 | // public int blockForAvailableThreads() {
25 | // return 1;
26 | // }
27 | //
28 | // @Override
29 | // public void initialize() throws SchedulerConfigException {
30 | //
31 | // }
32 | //
33 | // @Override
34 | // public void shutdown(boolean waitForJobsToComplete) {
35 | //
36 | // }
37 | //
38 | // @Override
39 | // public int getPoolSize() {
40 | // return 1;
41 | // }
42 | //
43 | // @Override
44 | // public void setInstanceId(String schedInstId) {
45 | //
46 | // }
47 | //
48 | // @Override
49 | // public void setInstanceName(String schedName) {
50 | //
51 | // }
52 | //
53 | // // support
54 | // public void setThreadCount(int count) {
55 | // //
56 | // }
57 | //
58 | // }
59 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/core/route/ExecutorRouter.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.core.route;
2 |
3 | import com.xxl.job.core.biz.model.ReturnT;
4 | import com.xxl.job.core.biz.model.TriggerParam;
5 | import org.slf4j.Logger;
6 | import org.slf4j.LoggerFactory;
7 |
8 | import java.util.List;
9 |
10 | /**
11 | * Created by xuxueli on 17/3/10.
12 | */
13 | public abstract class ExecutorRouter {
14 |
15 | protected static Logger logger = LoggerFactory.getLogger(ExecutorRouter.class);
16 |
17 | /**
18 | * route address
19 | * @param addressList
20 | * @return ReturnT.content=address
21 | */
22 | public abstract ReturnT route(TriggerParam triggerParam, List addressList);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteFirst.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.core.route.strategy;
2 |
3 | import com.xxl.job.admin.core.route.ExecutorRouter;
4 | import com.xxl.job.core.biz.model.ReturnT;
5 | import com.xxl.job.core.biz.model.TriggerParam;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | * Created by xuxueli on 17/3/10.
11 | */
12 | public class ExecutorRouteFirst extends ExecutorRouter {
13 |
14 | @Override
15 | public ReturnT route(TriggerParam triggerParam, List addressList) {
16 | return new ReturnT(addressList.get(0));
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteLast.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.core.route.strategy;
2 |
3 | import com.xxl.job.admin.core.route.ExecutorRouter;
4 | import com.xxl.job.core.biz.model.ReturnT;
5 | import com.xxl.job.core.biz.model.TriggerParam;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | * Created by xuxueli on 17/3/10.
11 | */
12 | public class ExecutorRouteLast extends ExecutorRouter {
13 |
14 | @Override
15 | public ReturnT route(TriggerParam triggerParam, List addressList) {
16 | return new ReturnT(addressList.get(addressList.size() - 1));
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteRandom.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.core.route.strategy;
2 |
3 | import com.xxl.job.admin.core.route.ExecutorRouter;
4 | import com.xxl.job.core.biz.model.ReturnT;
5 | import com.xxl.job.core.biz.model.TriggerParam;
6 |
7 | import java.util.List;
8 | import java.util.Random;
9 |
10 | /**
11 | * Created by xuxueli on 17/3/10.
12 | */
13 | public class ExecutorRouteRandom extends ExecutorRouter {
14 |
15 | private static Random localRandom = new Random();
16 |
17 | @Override
18 | public ReturnT route(TriggerParam triggerParam, List addressList) {
19 | String address = addressList.get(localRandom.nextInt(addressList.size()));
20 | return new ReturnT(address);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/core/scheduler/MisfireStrategyEnum.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.core.scheduler;
2 |
3 | import com.xxl.job.admin.core.util.I18nUtil;
4 |
5 | /**
6 | * @author xuxueli 2020-10-29 21:11:23
7 | */
8 | public enum MisfireStrategyEnum {
9 |
10 | /**
11 | * do nothing
12 | */
13 | DO_NOTHING(I18nUtil.getString("misfire_strategy_do_nothing")),
14 |
15 | /**
16 | * fire once now
17 | */
18 | FIRE_ONCE_NOW(I18nUtil.getString("misfire_strategy_fire_once_now"));
19 |
20 | private String title;
21 |
22 | MisfireStrategyEnum(String title) {
23 | this.title = title;
24 | }
25 |
26 | public String getTitle() {
27 | return title;
28 | }
29 |
30 | public static MisfireStrategyEnum match(String name, MisfireStrategyEnum defaultItem) {
31 | for (MisfireStrategyEnum item : MisfireStrategyEnum.values()) {
32 | if (item.name().equals(name)) {
33 | return item;
34 | }
35 | }
36 | return defaultItem;
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/core/scheduler/ScheduleTypeEnum.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.core.scheduler;
2 |
3 | import com.xxl.job.admin.core.util.I18nUtil;
4 |
5 | /**
6 | * @author xuxueli 2020-10-29 21:11:23
7 | */
8 | public enum ScheduleTypeEnum {
9 |
10 | NONE(I18nUtil.getString("schedule_type_none")),
11 |
12 | /**
13 | * schedule by cron
14 | */
15 | CRON(I18nUtil.getString("schedule_type_cron")),
16 |
17 | /**
18 | * schedule by fixed rate (in seconds)
19 | */
20 | FIX_RATE(I18nUtil.getString("schedule_type_fix_rate")),
21 |
22 | /**
23 | * schedule by fix delay (in seconds), after the last time
24 | */
25 | /* FIX_DELAY(I18nUtil.getString("schedule_type_fix_delay")) */;
26 |
27 | private String title;
28 |
29 | ScheduleTypeEnum(String title) {
30 | this.title = title;
31 | }
32 |
33 | public String getTitle() {
34 | return title;
35 | }
36 |
37 | public static ScheduleTypeEnum match(String name, ScheduleTypeEnum defaultItem) {
38 | for (ScheduleTypeEnum item : ScheduleTypeEnum.values()) {
39 | if (item.name().equals(name)) {
40 | return item;
41 | }
42 | }
43 | return defaultItem;
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/core/trigger/TriggerTypeEnum.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.core.trigger;
2 |
3 | import com.xxl.job.admin.core.util.I18nUtil;
4 |
5 | /**
6 | * trigger type enum
7 | *
8 | * @author xuxueli 2018-09-16 04:56:41
9 | */
10 | public enum TriggerTypeEnum {
11 |
12 | MANUAL(I18nUtil.getString("jobconf_trigger_type_manual")), CRON(
13 | I18nUtil.getString("jobconf_trigger_type_cron")), RETRY(
14 | I18nUtil.getString("jobconf_trigger_type_retry")), PARENT(
15 | I18nUtil.getString("jobconf_trigger_type_parent")), API(
16 | I18nUtil.getString("jobconf_trigger_type_api")), MISFIRE(
17 | I18nUtil.getString("jobconf_trigger_type_misfire"));
18 |
19 | private TriggerTypeEnum(String title) {
20 | this.title = title;
21 | }
22 |
23 | private String title;
24 |
25 | public String getTitle() {
26 | return title;
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/core/util/FtlUtil.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.core.util;
2 |
3 | import freemarker.ext.beans.BeansWrapper;
4 | import freemarker.ext.beans.BeansWrapperBuilder;
5 | import freemarker.template.Configuration;
6 | import freemarker.template.TemplateHashModel;
7 | import org.slf4j.Logger;
8 | import org.slf4j.LoggerFactory;
9 |
10 | /**
11 | * ftl util
12 | *
13 | * @author xuxueli 2018-01-17 20:37:48
14 | */
15 | public class FtlUtil {
16 |
17 | private static Logger logger = LoggerFactory.getLogger(FtlUtil.class);
18 |
19 | private static BeansWrapper wrapper = new BeansWrapperBuilder(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS)
20 | .build(); // BeansWrapper.getDefaultInstance();
21 |
22 | public static TemplateHashModel generateStaticModel(String packageName) {
23 | try {
24 | TemplateHashModel staticModels = wrapper.getStaticModels();
25 | TemplateHashModel fileStatics = (TemplateHashModel) staticModels.get(packageName);
26 | return fileStatics;
27 | }
28 | catch (Exception e) {
29 | logger.error(e.getMessage(), e);
30 | }
31 | return null;
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/dao/XxlJobGroupDao.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.dao;
2 |
3 | import com.xxl.job.admin.api.entity.XxlJobGroup;
4 | import org.apache.ibatis.annotations.Mapper;
5 | import org.apache.ibatis.annotations.Param;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | * Created by xuxueli on 16/9/30.
11 | */
12 | @Mapper
13 | public interface XxlJobGroupDao {
14 |
15 | public List findAll();
16 |
17 | public List findByAddressType(@Param("addressType") int addressType);
18 |
19 | public int save(XxlJobGroup xxlJobGroup);
20 |
21 | public int update(XxlJobGroup xxlJobGroup);
22 |
23 | public int remove(@Param("id") int id);
24 |
25 | public XxlJobGroup load(@Param("id") int id);
26 |
27 | public List pageList(@Param("offset") int offset, @Param("pagesize") int pagesize,
28 | @Param("appname") String appname, @Param("title") String title);
29 |
30 | public int pageListCount(@Param("offset") int offset, @Param("pagesize") int pagesize,
31 | @Param("appname") String appname, @Param("title") String title);
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/dao/XxlJobLogGlueDao.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.dao;
2 |
3 | import com.xxl.job.admin.api.entity.XxlJobLogGlue;
4 | import org.apache.ibatis.annotations.Mapper;
5 | import org.apache.ibatis.annotations.Param;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | * job log for glue
11 | *
12 | * @author xuxueli 2016-5-19 18:04:56
13 | */
14 | @Mapper
15 | public interface XxlJobLogGlueDao {
16 |
17 | public int save(XxlJobLogGlue xxlJobLogGlue);
18 |
19 | public List findByJobId(@Param("jobId") int jobId);
20 |
21 | public int removeOld(@Param("jobId") int jobId, @Param("limit") int limit);
22 |
23 | public int deleteByJobId(@Param("jobId") int jobId);
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/dao/XxlJobLogReportDao.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.dao;
2 |
3 | import com.xxl.job.admin.api.entity.XxlJobLogReport;
4 | import org.apache.ibatis.annotations.Mapper;
5 | import org.apache.ibatis.annotations.Param;
6 |
7 | import java.util.Date;
8 | import java.util.List;
9 |
10 | /**
11 | * job log
12 | *
13 | * @author xuxueli 2019-11-22
14 | */
15 | @Mapper
16 | public interface XxlJobLogReportDao {
17 |
18 | public int save(XxlJobLogReport xxlJobLogReport);
19 |
20 | public int update(XxlJobLogReport xxlJobLogReport);
21 |
22 | public List queryLogReport(@Param("triggerDayFrom") Date triggerDayFrom,
23 | @Param("triggerDayTo") Date triggerDayTo);
24 |
25 | public XxlJobLogReport queryLogReportTotal();
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/dao/XxlJobRegistryDao.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.dao;
2 |
3 | import com.xxl.job.admin.api.entity.XxlJobRegistry;
4 | import org.apache.ibatis.annotations.Mapper;
5 | import org.apache.ibatis.annotations.Param;
6 |
7 | import java.util.Date;
8 | import java.util.List;
9 |
10 | /**
11 | * Created by xuxueli on 16/9/30.
12 | */
13 | @Mapper
14 | public interface XxlJobRegistryDao {
15 |
16 | public List findDead(@Param("timeout") int timeout, @Param("nowTime") Date nowTime);
17 |
18 | public int removeDead(@Param("ids") List ids);
19 |
20 | public List findAll(@Param("timeout") int timeout, @Param("nowTime") Date nowTime);
21 |
22 | public int registryUpdate(@Param("registryGroup") String registryGroup, @Param("registryKey") String registryKey,
23 | @Param("registryValue") String registryValue, @Param("updateTime") Date updateTime);
24 |
25 | public int registrySave(@Param("registryGroup") String registryGroup, @Param("registryKey") String registryKey,
26 | @Param("registryValue") String registryValue, @Param("updateTime") Date updateTime);
27 |
28 | public int registryDelete(@Param("registryGroup") String registryGroup, @Param("registryKey") String registryKey,
29 | @Param("registryValue") String registryValue);
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/dao/XxlJobUserDao.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.dao;
2 |
3 | import com.xxl.job.admin.api.entity.XxlJobUser;
4 | import org.apache.ibatis.annotations.Mapper;
5 | import org.apache.ibatis.annotations.Param;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | * @author xuxueli 2019-05-04 16:44:59
11 | */
12 | @Mapper
13 | public interface XxlJobUserDao {
14 |
15 | public List pageList(@Param("offset") int offset, @Param("pagesize") int pagesize,
16 | @Param("username") String username, @Param("role") int role);
17 |
18 | public int pageListCount(@Param("offset") int offset, @Param("pagesize") int pagesize,
19 | @Param("username") String username, @Param("role") int role);
20 |
21 | public XxlJobUser loadByUserName(@Param("username") String username);
22 |
23 | public int save(XxlJobUser xxlJobUser);
24 |
25 | public int update(XxlJobUser xxlJobUser);
26 |
27 | public int delete(@Param("id") int id);
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/java/com/xxl/job/admin/service/impl/AdminBizImpl.java:
--------------------------------------------------------------------------------
1 | package com.xxl.job.admin.service.impl;
2 |
3 | import com.xxl.job.admin.core.thread.JobCompleteHelper;
4 | import com.xxl.job.admin.core.thread.JobRegistryHelper;
5 | import com.xxl.job.core.biz.AdminBiz;
6 | import com.xxl.job.core.biz.model.HandleCallbackParam;
7 | import com.xxl.job.core.biz.model.RegistryParam;
8 | import com.xxl.job.core.biz.model.ReturnT;
9 | import org.springframework.stereotype.Service;
10 |
11 | import java.util.List;
12 |
13 | /**
14 | * @author xuxueli 2017-07-27 21:54:20
15 | */
16 | @Service
17 | public class AdminBizImpl implements AdminBiz {
18 |
19 | @Override
20 | public ReturnT callback(List callbackParamList) {
21 | return JobCompleteHelper.getInstance().callback(callbackParamList);
22 | }
23 |
24 | @Override
25 | public ReturnT registry(RegistryParam registryParam) {
26 | return JobRegistryHelper.getInstance().registry(registryParam);
27 | }
28 |
29 | @Override
30 | public ReturnT registryRemove(RegistryParam registryParam) {
31 | return JobRegistryHelper.getInstance().registryRemove(registryParam);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | boot: # spring-boot admin 配置
3 | admin:
4 | client:
5 | url: http://xhuicloud-monitor:9090
6 | application:
7 | name: @artifactId@
8 | profiles:
9 | active: @profiles.active@
10 | cloud:
11 | nacos:
12 | discovery:
13 | #nacos 地址
14 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
15 | config:
16 | server-addr: ${NACOS_HOST:xhuicloud-register}:${NACOS_PORT:13000}
17 | config:
18 | import:
19 | - optional:nacos:@artifactId@-@profiles.active@.yml
20 | server:
21 | port: 20000
22 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/Ionicons/fonts/ionicons.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/Ionicons/fonts/ionicons.eot
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/Ionicons/fonts/ionicons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/Ionicons/fonts/ionicons.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/Ionicons/fonts/ionicons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/Ionicons/fonts/ionicons.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/plugins/iCheck/square/blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/plugins/iCheck/square/blue.png
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/plugins/iCheck/square/blue@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/adminlte/plugins/iCheck/square/blue@2x.png
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/favicon.ico
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/plugins/codemirror/addon/hint/show-hint.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-hints {
2 | position: absolute;
3 | z-index: 10;
4 | overflow: hidden;
5 | list-style: none;
6 |
7 | margin: 0;
8 | padding: 2px;
9 |
10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2);
13 | border-radius: 3px;
14 | border: 1px solid silver;
15 |
16 | background: white;
17 | font-size: 90%;
18 | font-family: monospace;
19 |
20 | max-height: 20em;
21 | overflow-y: auto;
22 | }
23 |
24 | .CodeMirror-hint {
25 | margin: 0;
26 | padding: 0 4px;
27 | border-radius: 2px;
28 | white-space: pre;
29 | color: black;
30 | cursor: pointer;
31 | }
32 |
33 | li.CodeMirror-hint-active {
34 | background: #08f;
35 | color: white;
36 | }
37 |
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/plugins/layer/theme/default/icon-ext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/plugins/layer/theme/default/icon-ext.png
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/plugins/layer/theme/default/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/plugins/layer/theme/default/icon.png
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/plugins/layer/theme/default/loading-0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/plugins/layer/theme/default/loading-0.gif
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/plugins/layer/theme/default/loading-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/plugins/layer/theme/default/loading-1.gif
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/plugins/layer/theme/default/loading-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sindaZeng/XHuiCloud/2fe07015e70db87b830135c8fa5e5e025b7869cf/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/static/plugins/layer/theme/default/loading-2.gif
--------------------------------------------------------------------------------
/XHuiCloud-business/XHuiCloud-xxl-admin/XHuiCloud-xxl-admin-service/src/main/resources/templates/common/common.exception.ftl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Error
6 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
System Error
25 |
${exceptionMsg}
26 |
Back
27 |
28 |
29 |
30 |
31 |