Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Configure Redisson using Spring YAML#6873

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

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

Conversation

@livk-cloud
Copy link

No description provided.

@mrniko
Copy link
Member

mrniko commented Dec 2, 2025

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

@mrniko
Copy link
Member

mrniko commented Dec 2, 2025

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
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
Copy link
Author

livk-cloud commented Dec 4, 2025

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

@mrniko
Copy link
Member

mrniko commented Dec 11, 2025

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 <[email protected]>
@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
@livk-cloud
Copy link
Author

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

@mrniko
Copy link
Member

mrniko commented Dec 12, 2025

@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
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

Copy link
Author

@livk-cloud livk-cloud Dec 16, 2025

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
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

Copy link
Author

@livk-cloud livk-cloud Dec 17, 2025

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