diff --git a/README-zh.md b/README-zh.md index af03e47..6c32fbd 100644 --- a/README-zh.md +++ b/README-zh.md @@ -16,8 +16,8 @@ https://guoshiqiufeng.github.io/spring-cloud-stream-redis/ ### 开发框架 -- Spring Cloud Stream 4.1.3 -- Spring Boot +- Spring Cloud Stream 4 +- Spring Boot 3 ### 功能 @@ -39,7 +39,7 @@ https://guoshiqiufeng.github.io/spring-cloud-stream-redis/ io.github.guoshiqiufeng.cloud spring-cloud-stream-dependencies - 0.3.0 + 0.4.0 import diff --git a/README.md b/README.md index 4bcc51a..f3b4b5b 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ https://guoshiqiufeng.github.io/spring-cloud-stream-redis/en/ ### Development Framework -- Spring Cloud Stream 4.1.3 -- Spring Boot +- Spring Cloud Stream 4 +- Spring Boot 3 ### Features @@ -41,7 +41,7 @@ https://guoshiqiufeng.github.io/spring-cloud-stream-redis/en/ io.github.guoshiqiufeng.cloud spring-cloud-stream-dependencies - 0.3.0 + 0.4.0 import diff --git a/binders/spring-cloud-stream-binder-redis-core/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/support/converter/MessagingMessageConverter.java b/binders/spring-cloud-stream-binder-redis-core/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/support/converter/MessagingMessageConverter.java index 8676dcf..3e05c53 100644 --- a/binders/spring-cloud-stream-binder-redis-core/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/support/converter/MessagingMessageConverter.java +++ b/binders/spring-cloud-stream-binder-redis-core/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/support/converter/MessagingMessageConverter.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023-2024, fubluesky (fubluesky@foxmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.guoshiqiufeng.cloud.stream.binder.redis.support.converter; import org.jetbrains.annotations.NotNull; diff --git a/binders/spring-cloud-stream-binder-redis-core/src/test/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/properties/RedisBinderConfigurationPropertiesTest.java b/binders/spring-cloud-stream-binder-redis-core/src/test/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/properties/RedisBinderConfigurationPropertiesTest.java index 5c21e06..a80ec2d 100644 --- a/binders/spring-cloud-stream-binder-redis-core/src/test/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/properties/RedisBinderConfigurationPropertiesTest.java +++ b/binders/spring-cloud-stream-binder-redis-core/src/test/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/properties/RedisBinderConfigurationPropertiesTest.java @@ -16,6 +16,7 @@ package io.github.guoshiqiufeng.cloud.stream.binder.redis.properties; import org.junit.jupiter.api.Test; +import org.springframework.boot.autoconfigure.data.redis.RedisProperties; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -30,19 +31,19 @@ public class RedisBinderConfigurationPropertiesTest { void testDefaultProperties() { RedisProperties redisProperties = new RedisProperties(); RedisBinderConfigurationProperties properties = new RedisBinderConfigurationProperties(redisProperties); - + assertEquals("localhost", properties.getConfiguration().getHost()); assertEquals(6379, properties.getConfiguration().getPort()); } - @Test + @Test void testCustomProperties() { RedisProperties redisProperties = new RedisProperties(); redisProperties.setHost("redis.example.com"); redisProperties.setPort(6380); - + RedisBinderConfigurationProperties properties = new RedisBinderConfigurationProperties(redisProperties); - + assertEquals("redis.example.com", properties.getConfiguration().getHost()); assertEquals(6380, properties.getConfiguration().getPort()); } diff --git a/binders/spring-cloud-stream-binder-redis/build.gradle b/binders/spring-cloud-stream-binder-redis/build.gradle index dca05a9..5c3cb0b 100644 --- a/binders/spring-cloud-stream-binder-redis/build.gradle +++ b/binders/spring-cloud-stream-binder-redis/build.gradle @@ -1,7 +1,7 @@ dependencies { api project(":binders:spring-cloud-stream-binder-redis-core") - annotationProcessor "org.springframework.boot:spring-boot-starter-actuator" + implementation "org.springframework.boot:spring-boot-starter-actuator" annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" annotationProcessor "org.springframework.boot:spring-boot-autoconfigure" diff --git a/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/config/RedisBinderConfiguration.java b/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/config/RedisBinderConfiguration.java index b847a88..f9af70a 100644 --- a/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/config/RedisBinderConfiguration.java +++ b/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/config/RedisBinderConfiguration.java @@ -31,6 +31,7 @@ import org.springframework.cloud.stream.config.ProducerMessageHandlerCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; import org.springframework.data.redis.listener.RedisMessageListenerContainer; import org.springframework.integration.redis.inbound.RedisStoreMessageSource; @@ -41,7 +42,7 @@ */ @Configuration(proxyBeanMethods = false) @ConditionalOnMissingBean(Binder.class) -// @Import({RedisBinderHealthIndicatorConfiguration.class}) +@Import({RedisBinderHealthIndicatorConfiguration.class}) @EnableConfigurationProperties({RedisProperties.class, RedisExtendedBindingProperties.class}) public class RedisBinderConfiguration { diff --git a/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/config/RedisBinderHealthIndicatorConfiguration.java b/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/config/RedisBinderHealthIndicatorConfiguration.java new file mode 100644 index 0000000..c3471a7 --- /dev/null +++ b/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/config/RedisBinderHealthIndicatorConfiguration.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2023-2024, fubluesky (fubluesky@foxmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.guoshiqiufeng.cloud.stream.binder.redis.config; + +import io.github.guoshiqiufeng.cloud.stream.binder.redis.health.RedisBinderHealth; +import io.github.guoshiqiufeng.cloud.stream.binder.redis.health.RedisBinderHealthIndicator; +import io.github.guoshiqiufeng.cloud.stream.binder.redis.properties.RedisBinderConfigurationProperties; +import io.github.guoshiqiufeng.cloud.stream.binder.redis.utils.RedisConnectionFactoryUtil; +import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.connection.RedisConnectionFactory; + +/** + * Configuration for Redis binder health indicators. + * + * @author yanghq + * @version 1.0 + * @since 2024/11/17 10:55 + */ +@Configuration(proxyBeanMethods = false) +@ConditionalOnClass(name = "org.springframework.boot.actuate.health.HealthIndicator") +@ConditionalOnEnabledHealthIndicator("binders") +@ConditionalOnMissingBean(RedisBinderHealth.class) +public class RedisBinderHealthIndicatorConfiguration { + + @Bean + public RedisBinderHealthIndicator redisBinderHealthIndicator(RedisBinderConfigurationProperties configurationProperties) { + RedisConnectionFactory connectionFactory = RedisConnectionFactoryUtil.getRedisConnectionFactory( + configurationProperties.getConfiguration()); + return new RedisBinderHealthIndicator(connectionFactory); + } +} diff --git a/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/health/RedisBinderHealth.java b/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/health/RedisBinderHealth.java new file mode 100644 index 0000000..40ff42a --- /dev/null +++ b/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/health/RedisBinderHealth.java @@ -0,0 +1,12 @@ +package io.github.guoshiqiufeng.cloud.stream.binder.redis.health; + +import org.springframework.boot.actuate.health.HealthIndicator; + +/** + * Health indicator for Redis binder. + * @author yanghq + * @version 1.0 + * @since 2024/11/18 15:07 + */ +public interface RedisBinderHealth extends HealthIndicator { +} diff --git a/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/health/RedisBinderHealthIndicator.java b/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/health/RedisBinderHealthIndicator.java new file mode 100644 index 0000000..34c35dc --- /dev/null +++ b/binders/spring-cloud-stream-binder-redis/src/main/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/health/RedisBinderHealthIndicator.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023-2024, fubluesky (fubluesky@foxmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.guoshiqiufeng.cloud.stream.binder.redis.health; + +import org.springframework.boot.actuate.data.redis.RedisHealthIndicator; +import org.springframework.data.redis.connection.RedisConnectionFactory; + +/** + * Health indicator for Redis binder. + * + * @author yanghq + * @version 1.0 + * @since 2024/11/17 10:00 + */ +public class RedisBinderHealthIndicator extends RedisHealthIndicator { + + public RedisBinderHealthIndicator(RedisConnectionFactory connectionFactory) { + super(connectionFactory); + } +} diff --git a/binders/spring-cloud-stream-binder-redis/src/test/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/health/RedisBinderHealthIndicatorIntegrationTest.java b/binders/spring-cloud-stream-binder-redis/src/test/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/health/RedisBinderHealthIndicatorIntegrationTest.java new file mode 100644 index 0000000..2fb382d --- /dev/null +++ b/binders/spring-cloud-stream-binder-redis/src/test/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/health/RedisBinderHealthIndicatorIntegrationTest.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2023-2024, fubluesky (fubluesky@foxmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.guoshiqiufeng.cloud.stream.binder.redis.health; + +import io.github.guoshiqiufeng.cloud.stream.binder.redis.RedisContainerTest; +import org.junit.jupiter.api.Test; +import org.springframework.boot.actuate.health.Health; +import org.springframework.boot.actuate.health.Status; +import org.springframework.data.redis.connection.RedisConnectionFactory; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * @author yanghq + * @version 1.0 + * @since 2024/11/17 17:04 + */ +class RedisBinderHealthIndicatorIntegrationTest implements RedisContainerTest { + + @Test + void shouldReportHealthWithRealRedis() { + RedisConnectionFactory connectionFactory = RedisContainerTest.connectionFactory(); + + RedisBinderHealthIndicator healthIndicator = new RedisBinderHealthIndicator(connectionFactory); + Health health = healthIndicator.health(); + + assertThat(health.getStatus()).isEqualTo(Status.UP); + assertThat(health.getDetails()) + .containsKey("version") + .containsKey("mode"); + } +} diff --git a/binders/spring-cloud-stream-binder-redis/src/test/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/health/RedisBinderHealthIndicatorTest.java b/binders/spring-cloud-stream-binder-redis/src/test/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/health/RedisBinderHealthIndicatorTest.java new file mode 100644 index 0000000..7a0deb8 --- /dev/null +++ b/binders/spring-cloud-stream-binder-redis/src/test/java/io/github/guoshiqiufeng/cloud/stream/binder/redis/health/RedisBinderHealthIndicatorTest.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2023-2024, fubluesky (fubluesky@foxmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.guoshiqiufeng.cloud.stream.binder.redis.health; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.actuate.health.Health; +import org.springframework.boot.actuate.health.Status; +import org.springframework.data.redis.connection.RedisConnection; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.connection.RedisServerCommands; + +import java.util.Properties; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.*; + +/** + * @author yanghq + * @version 1.0 + * @since 2024/11/17 17:04 + */ +class RedisBinderHealthIndicatorTest { + + private static final String REDIS_PONG_RESPONSE = "PONG"; + private static final String REDIS_VERSION_KEY = "redis_version"; + + @Test + void healthUp() { + RedisConnectionFactory connectionFactory = mock(RedisConnectionFactory.class); + RedisConnection redisConnection = mock(RedisConnection.class); + RedisServerCommands serverCommands = mock(RedisServerCommands.class); + + when(connectionFactory.getConnection()).thenReturn(redisConnection); + when(redisConnection.ping()).thenReturn(REDIS_PONG_RESPONSE); + when(redisConnection.serverCommands()).thenReturn(serverCommands); + + // Mock Redis info command response + Properties serverInfo = new Properties(); + serverInfo.setProperty(REDIS_VERSION_KEY, "7.0.2"); + when(serverCommands.info()).thenReturn(serverInfo); + + RedisBinderHealthIndicator healthIndicator = new RedisBinderHealthIndicator(connectionFactory); + Health health = healthIndicator.health(); + + assertThat(health.getStatus()).isEqualTo(Status.UP); + assertThat(health.getDetails()) + .containsEntry("version", "7.0.2"); + + verify(redisConnection).close(); + } + + @Test + void healthDown() { + RedisConnectionFactory connectionFactory = mock(RedisConnectionFactory.class); + RedisConnection redisConnection = mock(RedisConnection.class); + RedisServerCommands serverCommands = mock(RedisServerCommands.class); + + when(connectionFactory.getConnection()).thenReturn(redisConnection); + when(redisConnection.ping()).thenReturn("ERROR"); + when(redisConnection.serverCommands()).thenReturn(serverCommands); + when(serverCommands.info()).thenThrow(new RuntimeException("Redis is down")); + + RedisBinderHealthIndicator healthIndicator = new RedisBinderHealthIndicator(connectionFactory); + Health health = healthIndicator.health(); + + assertThat(health.getStatus()).isEqualTo(Status.DOWN); + assertThat(health.getDetails()) + .containsKey("error") + .containsValue("java.lang.RuntimeException: Redis is down"); + + verify(redisConnection).close(); + } + + @Test + void healthDownOnException() { + RedisConnectionFactory connectionFactory = mock(RedisConnectionFactory.class); + when(connectionFactory.getConnection()) + .thenThrow(new RuntimeException("Connection failed")); + + RedisBinderHealthIndicator healthIndicator = new RedisBinderHealthIndicator(connectionFactory); + Health health = healthIndicator.health(); + + assertThat(health.getStatus()).isEqualTo(Status.DOWN); + assertThat(health.getDetails()) + .containsKey("error") + .containsValue("java.lang.RuntimeException: Connection failed"); + } +} diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index ab8fe27..5aa4ff7 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -60,6 +60,7 @@ export default defineUserConfig({ '/guide/getting-started', '/guide/install', '/guide/config', + '/guide/actuator', // '/guide/annotation', ] }, @@ -90,6 +91,7 @@ export default defineUserConfig({ '/guide/getting-started', '/guide/install', '/guide/config', + '/guide/actuator', // '/guide/annotation', // { // text: '发送消息', @@ -114,6 +116,11 @@ export default defineUserConfig({ { text: '更新日志', link: 'https://github.com/guoshiqiufeng/spring-cloud-stream-redis/releases', + }, { + text: 'Maven central version', + children: [ + '/guide/maven-central-version' + ] } ] } @@ -144,6 +151,7 @@ export default defineUserConfig({ '/en/guide/getting-started', '/en/guide/install', '/en/guide/config', + '/en/guide/actuator', // '/en/guide/annotation', ] }, @@ -175,6 +183,7 @@ export default defineUserConfig({ '/en/guide/getting-started', '/en/guide/install', '/en/guide/config', + '/en/guide/actuator', // '/en/guide/annotation', // { // text: 'Send message', @@ -199,6 +208,11 @@ export default defineUserConfig({ { text: 'Changelog', link: 'https://github.com/guoshiqiufeng/spring-cloud-stream-redis/releases', + }, { + text: 'Maven central version', + children: [ + '/en/guide/maven-central-version' + ] } ] } diff --git a/docs/en/guide/actuator.md b/docs/en/guide/actuator.md new file mode 100644 index 0000000..b92c287 --- /dev/null +++ b/docs/en/guide/actuator.md @@ -0,0 +1,55 @@ +--- +lang: en-US +title: Actuator +description: Actuator +--- + +# Actuator + +> ake sure you have spring-cloud-stream-redis installed,if you haven't, check out the [Install](install.md)。 + +## Enable configuration + +```yaml:no-line-numbers +management: + endpoints: + web: + exposure: + include: '*' + endpoint: + health: + show-details: always + health: + binders: + enabled: true + redis: + enabled: false +``` + +## Access path + +`/actuator/health` + +Example: + +```json:no-line-numbers +{ + "status": "UP", + "components": { + "binders": { + "status": "UP", + "components": { + "redis": { + "status": "UP", + "details": { + "version": "7.1.2" + } + } + } + }, + "ping": { + "status": "UP" + } + } +} +``` \ No newline at end of file diff --git a/docs/en/guide/maven-central-version.md b/docs/en/guide/maven-central-version.md new file mode 100644 index 0000000..92dbcfb --- /dev/null +++ b/docs/en/guide/maven-central-version.md @@ -0,0 +1,36 @@ +## Maven central + +### spring-cloud-stream-dependencies + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-stream-dependencies%2Fmaven-metadata.xml) + +### spring-cloud-starter-stream-redis + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-starter-stream-redis%2Fmaven-metadata.xml) + +### spring-cloud-stream-binder-redis + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-stream-binder-redis%2Fmaven-metadata.xml) + +### spring-cloud-stream-binder-redis-core + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-stream-binder-redis-core%2Fmaven-metadata.xml) + +## AliYun Maven central + +### spring-cloud-stream-dependencies + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fmaven.aliyun.com%2Frepository%2Fpublic%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-stream-dependencies%2Fmaven-metadata.xml) + +### spring-cloud-starter-stream-redis + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fmaven.aliyun.com%2Frepository%2Fpublic%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-starter-stream-redis%2Fmaven-metadata.xml) + +### spring-cloud-stream-binder-redis + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fmaven.aliyun.com%2Frepository%2Fpublic%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-stream-binder-redis%2Fmaven-metadata.xml) + +### spring-cloud-stream-binder-redis-core + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fmaven.aliyun.com%2Frepository%2Fpublic%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-stream-binder-redis-core%2Fmaven-metadata.xml) + diff --git a/docs/guide/actuator.md b/docs/guide/actuator.md new file mode 100644 index 0000000..9b4fb20 --- /dev/null +++ b/docs/guide/actuator.md @@ -0,0 +1,55 @@ +--- +lang: zh-cn +title: 健康检查 +description: +--- + +# 健康检查 + +> 请确保您已经安装了 spring-cloud-stream-redis,如果您尚未安装,请查看 [安装](install.md)。 + +## 开启配置 + +```yaml:no-line-numbers +management: + endpoints: + web: + exposure: + include: '*' + endpoint: + health: + show-details: always + health: + binders: + enabled: true + redis: + enabled: false +``` + +## 访问路径 + +`/actuator/health` + +示例: + +```json:no-line-numbers +{ + "status": "UP", + "components": { + "binders": { + "status": "UP", + "components": { + "redis": { + "status": "UP", + "details": { + "version": "7.1.2" + } + } + } + }, + "ping": { + "status": "UP" + } + } +} +``` \ No newline at end of file diff --git a/docs/guide/maven-central-version.md b/docs/guide/maven-central-version.md new file mode 100644 index 0000000..92dbcfb --- /dev/null +++ b/docs/guide/maven-central-version.md @@ -0,0 +1,36 @@ +## Maven central + +### spring-cloud-stream-dependencies + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-stream-dependencies%2Fmaven-metadata.xml) + +### spring-cloud-starter-stream-redis + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-starter-stream-redis%2Fmaven-metadata.xml) + +### spring-cloud-stream-binder-redis + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-stream-binder-redis%2Fmaven-metadata.xml) + +### spring-cloud-stream-binder-redis-core + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-stream-binder-redis-core%2Fmaven-metadata.xml) + +## AliYun Maven central + +### spring-cloud-stream-dependencies + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fmaven.aliyun.com%2Frepository%2Fpublic%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-stream-dependencies%2Fmaven-metadata.xml) + +### spring-cloud-starter-stream-redis + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fmaven.aliyun.com%2Frepository%2Fpublic%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-starter-stream-redis%2Fmaven-metadata.xml) + +### spring-cloud-stream-binder-redis + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fmaven.aliyun.com%2Frepository%2Fpublic%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-stream-binder-redis%2Fmaven-metadata.xml) + +### spring-cloud-stream-binder-redis-core + +![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fmaven.aliyun.com%2Frepository%2Fpublic%2Fio%2Fgithub%2Fguoshiqiufeng%2Fcloud%2Fspring-cloud-stream-binder-redis-core%2Fmaven-metadata.xml) + diff --git a/ext.gradle b/ext.gradle index 91be1e1..693b3c1 100644 --- a/ext.gradle +++ b/ext.gradle @@ -4,7 +4,7 @@ ext { ] libraries = [ - springBoot3Version = '3.2.7', + springBoot3Version = '3.2.11', springCloudStreamVersion = '4.1.3' ] diff --git a/gradle.properties b/gradle.properties index 83e082a..76a022c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ # {x-release-please-start-version} -APP_VERSION=0.3.0 +APP_VERSION=0.4.0 # {x-release-please-end-version} APP_GROUP=io.github.guoshiqiufeng.cloud