CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 23:34:59 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-robots-tag: none
etag: W/"ee4933d8489353b6440d107b89429609"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=29xLylXdxWoYv39dFeBp4kBuTQF3jm81pLM4%2BDnRfEEo%2FH%2FOSFBoU%2B%2B4EZyglEfo%2BWNadY56E%2F1kCwow19Ph79zhTrw0ccQ5jy933fEaq%2FN3wdTCKG4lXBWaZKw5B%2BlXD7QyhMM64S%2FCUzWOfH8YRkvVMFEdCIQXyx63MdZdpxoNlpFMX3wwzSE1nHh67ReZxIvqMCHu17f4xGeeldyzwdDCmPdikgLVupX%2B4HXn4GfcWECjkhTNhk0Tuv7T%2Blnp5iL2eec%2BQGwLJeQUUsNOiA%3D%3D--tRUIYKMgz4N6nKZM--R1aZINt3rBzac8zdMifjjw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.987139039.1753313698; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 23:34:58 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 23:34:58 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: E68E:3AEC1B:193976:2303D3:688171A2
Getting Started V2.x · AnswerAIL/dingtalk-spring-boot-starter Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 80
Getting Started V2.x
Jaemon edited this page Nov 26, 2020
·
2 revisions
<dependency>
<groupId>com.github.answerail</groupId>
<artifactId>dingtalk-spring-boot-starter</artifactId>
<version>3.0.0-RELEASE</version>
</dependency>
spring:
dingtalk:
# token-id的值需要自己获取后替换
token-id: 92dbeb7bc28894c3bdcc3d13590168ad309974327b5f427cd85f9025ebb520ai
# 必填,建议: 可以用 project-id 作为 钉钉机器人设置安全策略-自定义关键词(自定义关键词有长度限制,可自行截取前缀或后缀)
project-id: ${spring.application.name}
# 钉钉机器人-加签值,开启加签时使用
# secret: sssss
token-id获取方式: token-id的值就是机器人的Webhook地址中access_token的值。
@SpringBootApplication
@DingerScan(basePackages = "com.jaemon.gss.dinger")
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
注意替换basePackages属性的值为自己项目中dinger接口层的包路径
package com.jaemon.gss.dinger;
public interface OrderDinger {
// 发送text类型消息
@DingerText(value = "订单号${orderNum}注册成功啦, 下单金额${amt}")
DingTalkResult orderSuccess(@Parameter("orderNum") String orderNo, @Parameter("amt") BigDecimal amt);
// 发送markdown类型消息
@DingerMarkdown(
value = "#### 注册失败啦\n - 订单号: ${orderNo}\n - 标识: ${flag}\n - 数量: ${num}",
title = "下单结果反馈"
)
DingTalkResult orderFailed(String orderNo, int num, boolean flag);
}
@Component
@Slf4j
public class InitializingBeanExecute implements InitializingBean {
@Autowired
private OrderDinger orderDinger;
@Override
public void afterPropertiesSet() throws Exception {
DingTalkResult dingTalkResult = orderDinger.orderSuccess(
"20200911001",
BigDecimal.valueOf(1000)
);
log.info(JSON.toJSONString(dingTalkResult));
DingTalkResult dingTalkResult1 = orderDinger.orderFailed(
"20200911002",
100,
false
);
log.info(JSON.toJSONString(dingTalkResult1));
}
}
如果按照以上配置后指定钉钉群并未收到消息, 排查原因时请关注下是否是钉钉机器人有三种安全设置策略(自定义关键词、加签,IP地址段)
问题导致。
Clone this wiki locally
You can’t perform that action at this time.