Skip to content

Commit

Permalink
fix dependency , add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
guoshiqiufeng committed Aug 30, 2024
1 parent a4ffd3f commit e6090b6
Show file tree
Hide file tree
Showing 15 changed files with 935 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ bin/

### Mac OS ###
.DS_Store

node_modules/**
/docs/.vuepress/.cache/
/docs/.vuepress/.temp/
2 changes: 1 addition & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## spring-cloud-stream-redis

[![Maven central](https://img.shields.io/maven-central/v/io.github.guoshiqiufeng.cloud/spring-cloud-starter-stream-redis.svg?style=flat-square)](https://search.maven.org/search?q=g:io.github.guoshiqiufeng%20AND%20a:spring-cloud-starter-stream-redis)
[![Maven central](https://img.shields.io/maven-central/v/io.github.guoshiqiufeng.cloud/spring-cloud-starter-stream-redis.svg?style=flat-square)](https://search.maven.org/search?q=g:io.github.guoshiqiufeng.cloud%20AND%20a:spring-cloud-starter-stream-redis)
[![License](https://img.shields.io/:license-apache-brightgreen.svg?style=flat-square)](http://www.apache.org/licenses/LICENSE-2.0.html)

阅读其他语言版本: [English](README.md)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## spring-cloud-stream-redis

[![Maven central](https://img.shields.io/maven-central/v/io.github.guoshiqiufeng.cloud/spring-cloud-stream-redis.svg?style=flat-square)](https://search.maven.org/search?q=g:io.github.guoshiqiufeng%20AND%20a:loki)
[![Maven central](https://img.shields.io/maven-central/v/io.github.guoshiqiufeng.cloud/spring-cloud-stream-redis.svg?style=flat-square)](https://search.maven.org/search?q=g:io.github.guoshiqiufeng.cloud%20AND%20a:spring-cloud-stream-redis)
[![License](https://img.shields.io/:license-apache-brightgreen.svg?style=flat-square)](http://www.apache.org/licenses/LICENSE-2.0.html)

Read in other languages: [简体中文](README-zh.md)
Expand Down
6 changes: 3 additions & 3 deletions bom/spring-cloud-stream-dependencies/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ description = "Spring Cloud Stream Dependencies"

dependencyManagement {
dependencies {
dependency "io.github.guoshiqiufeng:spring-cloud-stream-binder-redis-core:${APP_VERSION}"
dependency "io.github.guoshiqiufeng:spring-cloud-stream-binder-redis:${APP_VERSION}"
dependency "io.github.guoshiqiufeng:spring-cloud-starter-stream-redis:${APP_VERSION}"
dependency "${APP_GROUP}:spring-cloud-stream-binder-redis-core:${APP_VERSION}"
dependency "${APP_GROUP}:spring-cloud-stream-binder-redis:${APP_VERSION}"
dependency "${APP_GROUP}:spring-cloud-starter-stream-redis:${APP_VERSION}"
}
}
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ subprojects {
}
pom {
name = artifactId
description = 'spring cloud stream redis realization'
if (onlyPom) {
packaging 'pom'
} else {
Expand Down
9 changes: 9 additions & 0 deletions docs/.vuepress/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {provide} from "vue"
import {defineClientConfig} from "vuepress/client";
import {version} from '../../package.json'
export default defineClientConfig({
setup() {
console.log("version:" + version)
provide('version', version)
},
})
211 changes: 211 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
import {defineUserConfig} from 'vuepress'
import {defaultTheme} from '@vuepress/theme-default'
import {viteBundler} from '@vuepress/bundler-vite'
import {version} from '../../package.json'

export default defineUserConfig({
lang: 'zh-CN',
title: 'spring-cloud-stream-redis',
description: 'spring-cloud-stream-redis-doc',
base: '/spring-cloud-stream-redis/',
locales: {
// 键名是该语言所属的子路径
// 作为特例,默认语言可以使用 '/' 作为其路径。
'/': {
lang: 'zh-CN',
title: 'spring-cloud-stream-redis',
description: 'spring cloud stream redis 实现'
},
'/en/': {
lang: 'en-US',
title: 'spring-cloud-stream-redis',
description: 'spring cloud stream redis realization'
}
},
head: [
['link', {rel: 'icon', href: '/loki-doc/images/f.ico'}],
['link', {rel: 'shortcut icon', href: '/loki-doc/images/f.ico'}]
],
bundler: viteBundler(),
theme: defaultTheme({
// logo: "/images/logo.png",
// logoDark: "/images/logo-d.png",
locales: {
'/': {
label: '简体中文',
selectLanguageText: '选择语言',
selectLanguageName: '简体中文',
ariaLabel: '选择语言',
editLinkText: '在 GitHub 上编辑此页',
lastUpdated: true,
lastUpdatedText: '上次更新',
tip: '提示',
warning: '注意',
danger: '警告',
// 404 page
notFound: [
'这里什么都没有',
'我们怎么到这来了?',
'这是一个 404 页面',
'看起来我们进入了错误的链接',
],
contributors: false,
sidebar: {
"/guide/": [
{
text: '指南',
collapsible: true,
children: [
'/guide/introduction',
'/guide/getting-started',
'/guide/install',
'/guide/config',
// '/guide/annotation',
]
},
// {
// text: '发送消息',
// collapsible: true,
// children: [
// '/guide/send/introduction',
// '/guide/send/mapper',
// ]
// }, {
// text: '接收消息',
// collapsible: true,
// children: [
// '/guide/listener/introduction',
// '/guide/listener/auto',
// '/guide/listener/non-auto',
// ]
// }
],
},
navbar: [
{
text: '指南',
//link: '/guide/',
children: [
'/guide/introduction',
'/guide/getting-started',
'/guide/install',
'/guide/config',
// '/guide/annotation',
// {
// text: '发送消息',
// children: [
// '/guide/send/introduction',
// '/guide/send/mapper',
// ]
// },
// {
// text: '接收消息',
// children: [
// '/guide/listener/introduction',
// '/guide/listener/auto',
// '/guide/listener/non-auto',
// ]
// }
]
},
{
text: `v${version}`,
children: [
{
text: '更新日志',
link: 'https://github.com/guoshiqiufeng/spring-cloud-stream-redis/releases',
}
]
}
]
},
'/en/': {
label: 'English',
selectLanguageText: 'Languages',
selectLanguageName: 'English',
ariaLabel: 'Select language',
editLinkText: 'Edit this page on GitHub',
lastUpdated: true,
lastUpdatedText: 'Last Updated',
contributors: false,
notFound: [
'There\'s nothing here',
'How did we get here?',
'This is a 404 page',
'Looks like we ran into the wrong link',
],
sidebar: {
"/en/guide/": [
{
text: 'Guide',
collapsible: true,
children: [
'/en/guide/introduction',
'/en/guide/getting-started',
'/en/guide/install',
'/en/guide/config',
// '/en/guide/annotation',
]
},
// {
// text: 'Send message',
// collapsible: true,
// children: [
// '/en/guide/send/introduction',
// '/en/guide/send/mapper',
// ]
// },
// {
// text: 'Receive message',
// collapsible: true,
// children: [
// '/en/guide/listener/introduction',
// '/en/guide/listener/auto',
// '/en/guide/listener/non-auto',
// ]
// }
],
},
navbar: [
{
text: 'Guide',
// link: '/en/guide/',
children: [
'/en/guide/introduction',
'/en/guide/getting-started',
'/en/guide/install',
'/en/guide/config',
// '/en/guide/annotation',
// {
// text: 'Send message',
// children: [
// '/en/guide/send/introduction',
// '/en/guide/send/mapper',
// ]
// },
// {
// text: 'Receive message',
// children: [
// '/en/guide/listener/introduction',
// '/en/guide/listener/auto',
// '/en/guide/listener/non-auto',
// ]
// }
]
},
{
text: `v${version}`,
children: [
{
text: 'Changelog',
link: 'https://github.com/guoshiqiufeng/spring-cloud-stream-redis/releases',
}
]
}
]
},
},
repo: "https://github.com/guoshiqiufeng/spring-cloud-stream-redis"
}),
plugins: []
})
79 changes: 79 additions & 0 deletions docs/en/guide/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
lang: en-US
title: Configure
description: Configure
---
# Configure

[spring-cloud-stream-redis](https://github.com/guoshiqiufeng/spring-cloud-stream-redis) is very easy to configure, we just need some simple configuration!

> ake sure you have spring-cloud-stream-redis installed,if you haven't, check out the [Install](install.md)
## Redis

### `application.yml` Configure connection parameters
> Support Redis Standalone, Cluster, and Sentinel modes
>
> Support all configurations under `spring.data.redis`

```yaml:no-line-numbers
spring:
cloud:
stream:
default-binder: redis
binders:
redis:
type: redis
redis:
binder:
configuration:
host: 127.0.0.1
port: 6379
password: 123456
database: 7
support-type: queue_channel
# bindings:
# send-in-0:
# consumer:
# destination-is-pattern: true
bindings:
out-0:
destination: test-topic
content-type: text/plain
group: push-producer-group
send-in-0:
destination: test-topic
content-type: text/plain
group: test-send-group
```


### Optional Clients

The default is to use the `lettuce` client, if you need to switch to the jedis client, you can add a jedis dependency to do so, with the same configuration parameters as spring-boot-starter-data-redis.

```yaml:no-line-numbers
spring:
cloud:
stream:
default-binder: redis
binders:
redis:
type: redis
redis:
binder:
configuration:
host: 127.0.0.1
port: 6379
password: 123456
database: 7
client-type: jedis
jedis:
pool:
enabled: true
max-idle: 8
max-active: 8
```

Loading

0 comments on commit e6090b6

Please sign in to comment.