Skip to content

Commit

Permalink
feat: v1.3.0支持自定义发送客户端
Browse files Browse the repository at this point in the history
  • Loading branch information
AnswerAIL committed May 1, 2022
1 parent 040dc77 commit 6af2c6e
Show file tree
Hide file tree
Showing 168 changed files with 188 additions and 171 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.github.answerail</groupId>
<artifactId>dinger-spring-boot-starter</artifactId>
<packaging>jar</packaging>
<version>1.2.1</version>
<version>1.3.0</version>

<name>dinger-spring-boot-starter</name>
<description>Dinger-SpringBoot集成钉钉/企业微信群机器人实现消息通知中间件</description>
Expand All @@ -19,7 +19,7 @@
<spring-web-version>5.2.11.RELEASE</spring-web-version>
<java.version>1.8</java.version>
<slf4j-api.version>1.7.30</slf4j-api.version>
<jackson.version>2.11.3</jackson.version>
<jackson.version>2.13.2.2</jackson.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/github/jaemon/dinger/DingerSender.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,9 +15,11 @@
*/
package com.github.jaemon.dinger.config;

import com.github.jaemon.dinger.constant.DingerConstant;
import com.github.jaemon.dinger.support.client.DingerHttpClient;
import com.github.jaemon.dinger.support.client.DingerHttpTemplate;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand All @@ -28,6 +30,7 @@
* @since 1.0
*/
@Configuration
@ConditionalOnMissingBean(name = DingerConstant.DINGER_HTTP_CLIENT)
@AutoConfigureAfter(DingerHttpClientConfig.class)
public class AutoBeanConfiguration {
@Bean
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -44,6 +44,7 @@ public interface DingerConstant {
String DINGER_EXECUTOR = "dingerExecutor";
/** 自定义restTemplate名称 */
String DINGER_REST_TEMPLATE = "dingerRestTemplate";
String DINGER_HTTP_CLIENT = "dingerHttpClient";

String NEW_LINE = "\r\n";
String SPOT_SEPERATOR = ".";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -63,7 +63,7 @@ public DingerManagerBuilder() {
}

/**
* 自定义restTemplate客户端
* 自定义restTemplate客户端-服务于默认Http客户端
*
* @param dingerRestTemplate restTemplate
* @return this
Expand Down Expand Up @@ -181,4 +181,17 @@ public DingerManagerBuilder dingerAsyncCallback(DingerAsyncCallback dingerAsyncC
}
return this;
}

/**
* 定义发送客户端-dingerRestTemplate配置将失效
*
* @param dingerHttpClient dingerHttpClient
* @return this
*/
public DingerManagerBuilder dingerHttpClient(DingerHttpClient dingerHttpClient) {
if (dingerHttpClient != null) {
this.dingerHttpClient = dingerHttpClient;
}
return this;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ©2015-2021 Jaemon. All Rights Reserved.
* Copyright ©2015-2022 Jaemon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 6af2c6e

Please sign in to comment.