Skip to content

Configure Redisson using Spring YAML#6873

Open
livk-cloud wants to merge 6 commits into
redisson:masterfrom
livk-cloud:feat-spring-yaml
Open

Configure Redisson using Spring YAML#6873
livk-cloud wants to merge 6 commits into
redisson:masterfrom
livk-cloud:feat-spring-yaml

Conversation

@livk-cloud

Copy link
Copy Markdown

No description provided.

Signed-off-by: livk <livk.cloud@gmail.com>
@mrniko

mrniko commented Dec 2, 2025

Copy link
Copy Markdown
Member

Please cover that feature in the documentation as well https://github.com/redisson/redisson/blob/master/docs/integration-with-spring.md

Signed-off-by: livk <livk.cloud@gmail.com>
Signed-off-by: livk <livk.cloud@gmail.com>
@mrniko

mrniko commented Dec 2, 2025

Copy link
Copy Markdown
Member

In upcoming release Redisson doesn't use Jackson for yaml parsing, but Snake YAML directly. Please use Snake YAML lib for parsing

@livk-cloud

Copy link
Copy Markdown
Author

In upcoming release Redisson doesn't use Jackson for yaml parsing, but Snake YAML directly. Please use Snake YAML lib for parsing

It's more complicated to handle with Snake YAML, and I think I'll need more time to deal with it

@livk-cloud

livk-cloud commented Dec 4, 2025

Copy link
Copy Markdown
Author

Switching to Snake YAML has caused many problems that did not exist before, such as #6849 (comment)

@mrniko

mrniko commented Dec 11, 2025

Copy link
Copy Markdown
Member

Switching to Snake YAML has caused many problems that did not exist before, such as #6849 (comment)

Fixed

@livk-cloud
livk-cloud force-pushed the feat-spring-yaml branch 2 times, most recently from 34c11b9 to e222ff9 Compare December 12, 2025 02:28
Signed-off-by: livk <livk.cloud@gmail.com>
@livk-cloud
livk-cloud force-pushed the feat-spring-yaml branch 2 times, most recently from 7911ec7 to 525dec7 Compare December 12, 2025 03:27
Signed-off-by: livk <livk.cloud@gmail.com>
@livk-cloud

Copy link
Copy Markdown
Author

@mrniko I think redisson-spring-boot should add different modules for different versions, just like redisson-spring-data

@mrniko

mrniko commented Dec 12, 2025

Copy link
Copy Markdown
Member

@livk-cloud

I thought about it, maybe in the future.

@ConditionalOnClass({Redisson.class, RedisOperations.class, DataRedisAutoConfiguration.class})
@EnableConfigurationProperties({RedissonProperties.class, DataRedisProperties.class})
@EnableConfigurationProperties({RedissonPropertiesV4.class, DataRedisProperties.class})
public class RedissonAutoConfigurationV4 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Standard configuration won't work with your changes

@livk-cloud livk-cloud Dec 16, 2025

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrniko The use of new Properties is meant to better move configurations onto SpringBoot Yaml, and this will of course phase out the old configuration methods. Please refer to the new configuration

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@livk-cloud

Can we have both options? Since some users continue use classic Spring Boot Redis config

@livk-cloud livk-cloud Dec 17, 2025

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrniko I think I misunderstood what you meant earlier. If it is a standard SpringBoot Redis Config, it is of course supported. Please refer to the following code in AutoConfigurationV4.

@Fallback
    @Bean(value = "redissonClient", destroyMethod = "shutdown")
    @ConditionalOnMissingBean
    public RedissonClient fallbackRedissonClient(DataRedisProperties properties,
                                                 ObjectProvider<RedissonAutoConfigurationCustomizer> configCustomizers) {
        return RedissonClientFactory.create(properties, configCustomizers);
}

This is a test case

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants