@@ -0,0 +1,242 @@
|
||||
package com.hccake.ballcat.common.core.markdown;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 生成 markdown 文本
|
||||
*
|
||||
* @author lingting 2020/6/10 22:43
|
||||
*/
|
||||
public class MarkdownBuilder {
|
||||
public static final String TITLE_PREFIX = "#";
|
||||
public static final String QUOTE_PREFIX = "> ";
|
||||
public static final String BOLD_PREFIX = "**";
|
||||
public static final String ITALIC_PREFIX = "*";
|
||||
public static final String UNORDERED_LIST_PREFIX = "- ";
|
||||
public static final String ORDER_LIST_PREFIX = ". ";
|
||||
|
||||
/**
|
||||
* 存放内容
|
||||
*/
|
||||
private final List<String> content = new ArrayList<>();
|
||||
/**
|
||||
* 当前操作行文本
|
||||
*/
|
||||
private StringBuilder lineTextBuilder;
|
||||
|
||||
/**
|
||||
* 添加自定义内容
|
||||
*
|
||||
* @param content 自定义内容
|
||||
* @author lingting 2020-06-10 23:14:54
|
||||
*/
|
||||
public MarkdownBuilder append(String content) {
|
||||
lineTextBuilder.append(content);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 有序列表 自动生成 索引
|
||||
*
|
||||
* @param content 文本
|
||||
* @author lingting 2020-06-10 23:13:41
|
||||
*/
|
||||
public MarkdownBuilder orderList(String content) {
|
||||
// 获取最后一个字符串
|
||||
String tmp = "";
|
||||
if (this.content.size() != 0) {
|
||||
tmp = this.content.get(this.content.size() - 1);
|
||||
}
|
||||
// 索引
|
||||
int index = 1;
|
||||
|
||||
// 校验 是否 为有序列表行的正则
|
||||
String isOrderListPattern = "^\\d\\. .*";
|
||||
if (Pattern.matches(isOrderListPattern, tmp)) {
|
||||
// 如果是数字开头
|
||||
index = Convert.toInt(tmp.substring(0, tmp.indexOf(ORDER_LIST_PREFIX) - 1));
|
||||
}
|
||||
return orderList(index, content);
|
||||
}
|
||||
|
||||
/**
|
||||
* 有序列表
|
||||
*
|
||||
* @param index 索引
|
||||
* @param content 文本
|
||||
* @author lingting 2020-06-10 23:13:41
|
||||
*/
|
||||
public MarkdownBuilder orderList(int index, String content) {
|
||||
lineBreak();
|
||||
lineTextBuilder.append(index).append(ORDER_LIST_PREFIX).append(content);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 无序列表
|
||||
* - item1
|
||||
* - item2
|
||||
*
|
||||
* @author lingting 2020-06-10 23:09:29
|
||||
*/
|
||||
public MarkdownBuilder unorderedList(String content) {
|
||||
// 换行
|
||||
lineBreak();
|
||||
lineTextBuilder.append(UNORDERED_LIST_PREFIX).append(content);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*
|
||||
* @param url 图片链接
|
||||
* @author lingting 2020-06-10 23:03:04
|
||||
*/
|
||||
public MarkdownBuilder pic(String url) {
|
||||
return pic(StrUtil.EMPTY, url);
|
||||
}
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*
|
||||
* @param title 图片标题
|
||||
* @param url 图片路径
|
||||
* @author lingting 2020-06-10 23:03:11
|
||||
*/
|
||||
public MarkdownBuilder pic(String title, String url) {
|
||||
lineTextBuilder.append(".append(url).append(")");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 链接
|
||||
*
|
||||
* @param title 标题
|
||||
* @param url http 路径
|
||||
* @author lingting 2020-06-10 23:01:15
|
||||
*/
|
||||
public MarkdownBuilder link(String title, String url) {
|
||||
lineTextBuilder.append("[").append(title).append("](").append(url).append(")");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 斜体
|
||||
*
|
||||
* @author lingting 2020-06-10 22:59:26
|
||||
*/
|
||||
public MarkdownBuilder italic(String content) {
|
||||
lineTextBuilder.append(ITALIC_PREFIX).append(content).append(ITALIC_PREFIX);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加粗
|
||||
*
|
||||
* @author lingting 2020-06-10 22:58:39
|
||||
*/
|
||||
public MarkdownBuilder bold(String content) {
|
||||
lineTextBuilder.append(BOLD_PREFIX).append(content).append(BOLD_PREFIX);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 引用
|
||||
* > 文本
|
||||
*
|
||||
* @param content 文本
|
||||
* @author lingting 2020-06-10 22:58:04
|
||||
*/
|
||||
public MarkdownBuilder quote(String content) {
|
||||
forceLineBreak();
|
||||
lineTextBuilder.append(QUOTE_PREFIX).append(content);
|
||||
// 下面得换行两次
|
||||
forceLineBreak();
|
||||
forceLineBreak();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 强制换行
|
||||
*
|
||||
* @author lingting 2020-06-10 22:56:25
|
||||
*/
|
||||
public MarkdownBuilder forceLineBreak() {
|
||||
content.add(lineTextBuilder.toString());
|
||||
lineTextBuilder = new StringBuilder();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 换行
|
||||
* 当已编辑文本长度不为0时换行
|
||||
*
|
||||
* @author lingting 2020-06-10 22:56:25
|
||||
*/
|
||||
public MarkdownBuilder lineBreak() {
|
||||
if (lineTextBuilder.length() != 0) {
|
||||
return forceLineBreak();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成 i 级标题
|
||||
*
|
||||
* @author lingting 2020-06-10 22:55:39
|
||||
*/
|
||||
private MarkdownBuilder title(int i, String content) {
|
||||
lineTextBuilder = new StringBuilder();
|
||||
for (int j = 0; j < i; j++) {
|
||||
lineTextBuilder.append(TITLE_PREFIX);
|
||||
}
|
||||
this.content.add(lineTextBuilder.append(" ").append(content).toString());
|
||||
lineTextBuilder = new StringBuilder();
|
||||
return this;
|
||||
}
|
||||
|
||||
public MarkdownBuilder title1(String text) {
|
||||
return title(1, text);
|
||||
}
|
||||
|
||||
public MarkdownBuilder title2(String text) {
|
||||
return title(2, text);
|
||||
}
|
||||
|
||||
public MarkdownBuilder title3(String text) {
|
||||
return title(3, text);
|
||||
}
|
||||
|
||||
public MarkdownBuilder title4(String text) {
|
||||
return title(4, text);
|
||||
}
|
||||
|
||||
public MarkdownBuilder title5(String text) {
|
||||
return title(5, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 构筑 Markdown 文本
|
||||
*
|
||||
* @author lingting 2020-06-11 22:55:40
|
||||
*/
|
||||
public String build() {
|
||||
if (lineTextBuilder.length() != 0) {
|
||||
// 最后一个操作的 如果不为空,也需要添加进入list
|
||||
content.add(lineTextBuilder.toString());
|
||||
}
|
||||
StringBuilder res = new StringBuilder();
|
||||
content.forEach(content -> res.append(content).append("\\n"));
|
||||
return res.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-dependencies</artifactId>
|
||||
<version>${revision}</version>
|
||||
<packaging>pom</packaging>
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-dependencies</artifactId>
|
||||
<version>${revision}</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>Ballcat Dependencies</name>
|
||||
<description>Ballcat Dependencies</description>
|
||||
@@ -35,70 +35,69 @@
|
||||
|
||||
|
||||
<properties>
|
||||
<revision>0.0.2</revision>
|
||||
<flatten-maven-plugin.version>1.1.0</flatten-maven-plugin.version>
|
||||
<revision>0.0.2</revision>
|
||||
<flatten-maven-plugin.version>1.1.0</flatten-maven-plugin.version>
|
||||
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
|
||||
<maven-release-plugin.version>3.0.0-M1</maven-release-plugin.version>
|
||||
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
|
||||
|
||||
|
||||
<hutool.version>5.2.5</hutool.version>
|
||||
<mybatis-plus.version>3.3.2</mybatis-plus.version>
|
||||
<simple-cache.version>1.0.0</simple-cache.version>
|
||||
<swagger.core.version>1.5.2</swagger.core.version>
|
||||
<xxl-job.version>2.2.0</xxl-job.version>
|
||||
<spring-boot-admin.version>2.2.2</spring-boot-admin.version>
|
||||
<oss.aliyun.version>3.8.0</oss.aliyun.version>
|
||||
<easyexcel.version>2.1.6</easyexcel.version>
|
||||
</properties>
|
||||
<mybatis-plus.version>3.3.2</mybatis-plus.version>
|
||||
<simple-cache.version>1.0.0</simple-cache.version>
|
||||
<swagger.core.version>1.5.2</swagger.core.version>
|
||||
<xxl-job.version>2.2.0</xxl-job.version>
|
||||
<spring-boot-admin.version>2.2.2</spring-boot-admin.version>
|
||||
<oss.aliyun.version>3.8.0</oss.aliyun.version>
|
||||
<easyexcel.version>2.1.6</easyexcel.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-admin-core</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-common-conf</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-common-core</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-job</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-log</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-swagger</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-storage</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-mail</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-easyexcel</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-admin-core</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-common-conf</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-common-core</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-job</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-log</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-swagger</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-storage</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-mail</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-easyexcel</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-spring-boot-starter-redis</artifactId>
|
||||
@@ -106,76 +105,87 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>mybatis-plus-extend</artifactId>
|
||||
<artifactId>ballcat-spring-boot-starter-ding-talk</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-extend-ding-talk</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>mybatis-plus-mysql-extend</artifactId>
|
||||
<artifactId>ballcat-extend-mybatis-plus</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-extend-mybatis-plus-mysql</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!--swagger注解-->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger.core.version}</version>
|
||||
</dependency>
|
||||
<!--xxl-job-->
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>${xxl-job.version}</version>
|
||||
</dependency>
|
||||
<!--mybatis plus extension,包含了mybatis plus core-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-extension</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-core</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<!--mybatis-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<!--aliyun oss sdk-->
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
<version>${oss.aliyun.version}</version>
|
||||
</dependency>
|
||||
<!--easyExcel 处理-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<version>${easyexcel.version}</version>
|
||||
</dependency>
|
||||
<!--监控server端-->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-server</artifactId>
|
||||
<version>${spring-boot-admin.version}</version>
|
||||
</dependency>
|
||||
<!--监控Client-->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>${spring-boot-admin.version}</version>
|
||||
</dependency>
|
||||
<!--hutool工具类-->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<!--swagger注解-->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger.core.version}</version>
|
||||
</dependency>
|
||||
<!--xxl-job-->
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>${xxl-job.version}</version>
|
||||
</dependency>
|
||||
<!--mybatis plus extension,包含了mybatis plus core-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-extension</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-core</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<!--mybatis-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<!--aliyun oss sdk-->
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
<version>${oss.aliyun.version}</version>
|
||||
</dependency>
|
||||
<!--easyExcel 处理-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<version>${easyexcel.version}</version>
|
||||
</dependency>
|
||||
<!--监控server端-->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-server</artifactId>
|
||||
<version>${spring-boot-admin.version}</version>
|
||||
</dependency>
|
||||
<!--监控Client-->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>${spring-boot-admin.version}</version>
|
||||
</dependency>
|
||||
<!--hutool工具类-->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
@@ -188,7 +198,7 @@
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<build>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -213,34 +223,34 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>flatten-maven-plugin</artifactId>
|
||||
<version>${flatten-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<updatePomFile>true</updatePomFile>
|
||||
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>flatten</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>flatten</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>flatten.clean</id>
|
||||
<phase>clean</phase>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>flatten-maven-plugin</artifactId>
|
||||
<version>${flatten-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<updatePomFile>true</updatePomFile>
|
||||
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>flatten</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>flatten</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>flatten.clean</id>
|
||||
<phase>clean</phase>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<!--环境变量-->
|
||||
<profiles>
|
||||
|
||||
20
ballcat-extends/ballcat-extend-ding-talk/pom.xml
Normal file
20
ballcat-extends/ballcat-extend-ding-talk/pom.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ballcat-extends</artifactId>
|
||||
<groupId>com.hccake</groupId>
|
||||
<version>0.0.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ballcat-extend-ding-talk</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-common-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.hccake.extend.ding.talk;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 钉钉返回信息
|
||||
*
|
||||
* @author lingting 2020/6/11 0:23
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class DingTalkResponse {
|
||||
private String errCode;
|
||||
/**
|
||||
* 值为ok表示无异常
|
||||
*/
|
||||
private String errMsg;
|
||||
/**
|
||||
* 钉钉返回信息
|
||||
*/
|
||||
private String response;
|
||||
|
||||
public static DingTalkResponse getInstance(String res) {
|
||||
JSONObject json = JSONUtil.parseObj(res);
|
||||
DingTalkResponse response = new DingTalkResponse();
|
||||
response.errCode = json.getStr("errcode");
|
||||
response.errMsg = json.getStr("errmsg");
|
||||
response.response = res;
|
||||
return response;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return response;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.hccake.extend.ding.talk;
|
||||
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.hccake.extend.ding.talk.message.DingTalkMessage;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* 订单消息发送
|
||||
*
|
||||
* @author lingting 2020/6/10 21:25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@RequiredArgsConstructor
|
||||
public class DingTalkSender {
|
||||
/**
|
||||
* 请求路径
|
||||
*/
|
||||
private final String url;
|
||||
/**
|
||||
* 密钥
|
||||
*/
|
||||
private String secret;
|
||||
|
||||
/**
|
||||
* 发送消息
|
||||
* 根据参数值判断使用哪种发送方式
|
||||
*
|
||||
* @author lingting 2020-06-11 00:05:51
|
||||
*/
|
||||
@SneakyThrows
|
||||
public DingTalkResponse sendMessage(DingTalkMessage message) {
|
||||
if (StrUtil.isEmpty(secret)) {
|
||||
return sendNormalMessage(message);
|
||||
} else {
|
||||
return sendSecretMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 未使用 加签 安全设置 直接发送
|
||||
*
|
||||
* @author lingting 2020-06-11 00:09:23
|
||||
*/
|
||||
public DingTalkResponse sendNormalMessage(DingTalkMessage message) {
|
||||
return DingTalkResponse.getInstance(HttpUtil.post(url, message.toString()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用 加签 安全设置 发送
|
||||
*
|
||||
* @author lingting 2020-06-11 00:10:38
|
||||
*/
|
||||
@SneakyThrows
|
||||
public DingTalkResponse sendSecretMessage(DingTalkMessage message) {
|
||||
return DingTalkResponse.getInstance(HttpUtil.post(secret(), message.toString()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取签名后的请求路径
|
||||
*
|
||||
* @author lingting 2020-06-11 00:13:55
|
||||
*/
|
||||
@SneakyThrows
|
||||
public String secret() {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
String stringToSign = timestamp + "\n" + secret;
|
||||
Mac mac = Mac.getInstance("HmacSHA256");
|
||||
mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
|
||||
byte[] signData = mac.doFinal(stringToSign.getBytes(StandardCharsets.UTF_8));
|
||||
String encode = URLEncoder.encode(Base64.encode(signData), "UTF-8");
|
||||
return url + "×tamp=" + timestamp + "&sign=" + encode;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.hccake.extend.ding.talk.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 跳转 ActionCard 类型 消息的按钮排列方式
|
||||
*
|
||||
* @author lingting 2020/6/10 23:44
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ActionBtnOrientationEnum {
|
||||
/**
|
||||
* 按钮排列样式值 说明
|
||||
*/
|
||||
VERTICAL("0", "按钮竖向排列"),
|
||||
HORIZONTAL("1", "按钮横向排列"),
|
||||
;
|
||||
private final String val;
|
||||
private final String text;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.hccake.extend.ding.talk.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 钉钉消息类型
|
||||
*
|
||||
* @author lingting 2020/6/10 21:29
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum MessageTypeEnum {
|
||||
/**
|
||||
* 消息值 消息说明
|
||||
*/
|
||||
TEXT("text", "文本"),
|
||||
LINK("link", "链接"),
|
||||
MARKDOWN("markdown", "markdown"),
|
||||
ACTION_CARD("actionCard", "跳转 actionCard 类型"),
|
||||
;
|
||||
private final String val;
|
||||
private final String desc;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.hccake.extend.ding.talk.message;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.hccake.extend.ding.talk.enums.MessageTypeEnum;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 钉钉消息基础类
|
||||
*
|
||||
* @author lingting 2020/6/10 21:28
|
||||
*/
|
||||
public abstract class AbstractDingTalkMessage implements DingTalkMessage {
|
||||
/**
|
||||
* at 的人的手机号码
|
||||
*/
|
||||
private final Set<String> atPhones = new HashSet<>();
|
||||
/**
|
||||
* 是否 at 所有人
|
||||
*/
|
||||
private boolean atAll = false;
|
||||
|
||||
public AbstractDingTalkMessage atAll() {
|
||||
atAll = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加 at 对象的手机号
|
||||
*
|
||||
* @author lingting 2020-06-10 21:57:08
|
||||
*/
|
||||
public AbstractDingTalkMessage addPhone(String phone) {
|
||||
atPhones.add(phone);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取消息类型
|
||||
*
|
||||
* @return 返回消息类型
|
||||
* @author lingting 2020-06-10 22:12:30
|
||||
*/
|
||||
public abstract MessageTypeEnum getType();
|
||||
|
||||
/**
|
||||
* 生成内容json
|
||||
*
|
||||
* @return 返回生成的json字符串
|
||||
* @author lingting 2020-06-10 22:11:04
|
||||
*/
|
||||
public abstract JSONObject json();
|
||||
|
||||
@Override
|
||||
@SneakyThrows
|
||||
public String toString() {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("msgtype", getType().getVal());
|
||||
json.putAll(json());
|
||||
json.put(
|
||||
"at",
|
||||
new JSONObject()
|
||||
.put("isAtAll", atAll)
|
||||
.put("atMobiles", JSONUtil.toJsonStr(atPhones))
|
||||
);
|
||||
return json.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.hccake.extend.ding.talk.message;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.hccake.ballcat.common.core.markdown.MarkdownBuilder;
|
||||
import com.hccake.extend.ding.talk.enums.ActionBtnOrientationEnum;
|
||||
import com.hccake.extend.ding.talk.enums.MessageTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 跳转 ActionCard类型
|
||||
*
|
||||
* @author lingting 2020/6/10 23:39
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
public class DingTalkActionCardMessage extends AbstractDingTalkMessage {
|
||||
private String title;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private MarkdownBuilder text;
|
||||
/**
|
||||
* 按钮排列样式 默认横
|
||||
*/
|
||||
private ActionBtnOrientationEnum orientation = ActionBtnOrientationEnum.HORIZONTAL;
|
||||
/**
|
||||
* 单个按钮的标题
|
||||
*/
|
||||
private String singleTitle;
|
||||
/**
|
||||
* 点击singleTitle按钮触发的URL
|
||||
*/
|
||||
private String singleUrl;
|
||||
|
||||
/**
|
||||
* 自定义按钮组 如果配置了 按钮组 则 单按钮配置无效
|
||||
*/
|
||||
private List<Button> buttons = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 添加按钮
|
||||
*
|
||||
* @author lingting 2020-06-10 23:59:45
|
||||
*/
|
||||
public DingTalkActionCardMessage addButton(String title, String url) {
|
||||
buttons.add(new Button(title, url));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MessageTypeEnum getType() {
|
||||
return MessageTypeEnum.ACTION_CARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject json() {
|
||||
// 头
|
||||
String jsonStr = "{\"actionCard\":{" +
|
||||
"\"title\":\"" + title + "\"," +
|
||||
"\"text\":\"" + text.build() + "\"," +
|
||||
"\"btnOrientation\":\"" + orientation.getVal() + "\",";
|
||||
|
||||
// 当 单按钮的 文本和链接都不为空时
|
||||
if (buttons.size() == 0) {
|
||||
jsonStr += "\"singleTitle\":\"" + singleTitle + "\"," +
|
||||
"\"singleURL\":\"" + singleUrl + "\",";
|
||||
} else {
|
||||
// 否则使用自定义按钮组
|
||||
jsonStr += "\"btns\":" + JSONUtil.toJsonStr(buttons);
|
||||
}
|
||||
|
||||
// 尾
|
||||
jsonStr += "}}";
|
||||
return JSONUtil.parseObj(jsonStr);
|
||||
}
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public static class Button {
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private final String title;
|
||||
/**
|
||||
* 跳转路径
|
||||
*/
|
||||
private final String actionURL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.hccake.extend.ding.talk.message;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.hccake.extend.ding.talk.enums.MessageTypeEnum;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author lingting 2020/6/10 22:13
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
public class DingTalkLinkMessage extends AbstractDingTalkMessage {
|
||||
/**
|
||||
* 文本
|
||||
*/
|
||||
private String text;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 图片url
|
||||
*/
|
||||
private String picUrl;
|
||||
/**
|
||||
* 消息链接
|
||||
*/
|
||||
private String messageUrl;
|
||||
|
||||
@Override
|
||||
public MessageTypeEnum getType() {
|
||||
return MessageTypeEnum.LINK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject json() {
|
||||
return JSONUtil.parseObj("{\"link\":{\"text\":\"" + text + "\",\"title\":\"" + title + "\",\"picUrl\":\"" + picUrl + "\",\"messageUrl\":\"" + messageUrl + "\"}}");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.hccake.extend.ding.talk.message;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.hccake.ballcat.common.core.markdown.MarkdownBuilder;
|
||||
import com.hccake.extend.ding.talk.enums.MessageTypeEnum;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author lingting 2020/6/10 22:13
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
public class DingTalkMarkDownMessage extends AbstractDingTalkMessage {
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private MarkdownBuilder text;
|
||||
|
||||
@Override
|
||||
public MessageTypeEnum getType() {
|
||||
return MessageTypeEnum.MARKDOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject json() {
|
||||
return JSONUtil.parseObj("{\"markdown\":{\"title\":\"" + title + "\",\"text\":\"" + text.build() + "\"}}");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.hccake.extend.ding.talk.message;
|
||||
|
||||
/**
|
||||
* @author lingting 2020/6/11 21:58
|
||||
*/
|
||||
public interface DingTalkMessage {
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.hccake.extend.ding.talk.message;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.hccake.extend.ding.talk.enums.MessageTypeEnum;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author lingting 2020/6/10 22:13
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
public class DingTalkTextMessage extends AbstractDingTalkMessage {
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
@Override
|
||||
public MessageTypeEnum getType() {
|
||||
return MessageTypeEnum.TEXT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject json() {
|
||||
return JSONUtil.parseObj("{\"text\":{\"content\":\"" + content + "\"}}");
|
||||
}
|
||||
}
|
||||
@@ -9,14 +9,13 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>mybatis-plus-mysql-extend</artifactId>
|
||||
<artifactId>ballcat-extend-mybatis-plus-mysql</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>mybatis-plus-extend</artifactId>
|
||||
<artifactId>ballcat-extend-mybatis-plus</artifactId>
|
||||
</dependency>
|
||||
<!--hutool-->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ballcat-extends</artifactId>
|
||||
@@ -9,9 +9,7 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>mybatis-plus-extend</artifactId>
|
||||
|
||||
<name>mybatis-plus-extend</name>
|
||||
<artifactId>ballcat-extend-mybatis-plus</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<!--mybatis plus-->
|
||||
@@ -35,4 +33,4 @@
|
||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
</project>
|
||||
@@ -12,7 +12,8 @@
|
||||
<artifactId>ballcat-extends</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>mybatis-plus-extend</module>
|
||||
<module>mybatis-plus-mysql-extend</module>
|
||||
<module>ballcat-extend-mybatis-plus</module>
|
||||
<module>ballcat-extend-mybatis-plus-mysql</module>
|
||||
<module>ballcat-extend-ding-talk</module>
|
||||
</modules>
|
||||
</project>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ballcat-starters</artifactId>
|
||||
<groupId>com.hccake</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ballcat-spring-boot-starter-ding-talk</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hccake</groupId>
|
||||
<artifactId>ballcat-extend-ding-talk</artifactId>
|
||||
</dependency>
|
||||
<!-- spring boot 配置所需依赖 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.hccake.starter.ding.talk;
|
||||
|
||||
import com.hccake.extend.ding.talk.DingTalkSender;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author lingting 2020/6/11 23:14
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "ballcat.ding-talk.url")
|
||||
@EnableConfigurationProperties({DingTalkProperties.class})
|
||||
public class DingTalkAutoConfiguration {
|
||||
private final DingTalkProperties dingTalkProperties;
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public DingTalkSender dingTalkSender() {
|
||||
DingTalkSender sender = new DingTalkSender(dingTalkProperties.getUrl());
|
||||
sender.setSecret(dingTalkProperties.getSecret());
|
||||
return sender;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.hccake.starter.ding.talk;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
/**
|
||||
* @author lingting 2020/6/11 23:19
|
||||
*/
|
||||
@Data
|
||||
@ConfigurationProperties(prefix = "ballcat.ding-talk")
|
||||
public class DingTalkProperties {
|
||||
/**
|
||||
* Web hook 地址
|
||||
*/
|
||||
private String url;
|
||||
/**
|
||||
* 密钥
|
||||
*/
|
||||
private String secret;
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.hccake.starter.ding.talk.DingTalkAutoConfiguration
|
||||
@@ -20,6 +20,7 @@
|
||||
<module>ballcat-spring-boot-starter-mail</module>
|
||||
<module>ballcat-spring-boot-starter-easyexcel</module>
|
||||
<module>ballcat-spring-boot-starter-redis</module>
|
||||
<module>ballcat-spring-boot-starter-ding-talk</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
4
pom.xml
4
pom.xml
@@ -13,8 +13,8 @@
|
||||
<module>ballcat-starters</module>
|
||||
<module>ballcat-samples</module>
|
||||
<module>ballcat-dependencies</module>
|
||||
<module>ballcat-extends</module>
|
||||
</modules>
|
||||
<module>ballcat-extends</module>
|
||||
</modules>
|
||||
<name>ballcat</name>
|
||||
<description>项目基本脚手架</description>
|
||||
<url>https://github.com/hccake/ballcat</url>
|
||||
|
||||
Reference in New Issue
Block a user