Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RedisAutoConfig Exclusion logic #10728

Merged
merged 2 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ public static class Saml {}
@ConditionalOnProperty(name = "authenticate", havingValue = "oauth2")
@EnableAutoConfiguration(exclude=Saml2RelyingPartyAutoConfiguration.class)
public static class OAuth2 {}

@Configuration
@ConditionalOnProperty(name = "persistence.cache_type", havingValue = "redis", isNot = true)
@ConditionalOnExpression(
"T(org.apache.commons.lang3.StringUtils).isEmpty('${spring.session.store-type:}')"
)
@EnableAutoConfiguration(exclude=RedisAutoConfiguration.class)
public static class Redis {}

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/application.properties.EXAMPLE
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,6 @@ logging.level.root=INFO

## Redis HTTP Session Store
# Redis Session
## Comment out the line below to enable redis caching
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
Comment on lines -400 to -401
Copy link
Member

Choose a reason for hiding this comment

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

is this going to cause an issue in our prod environment? I think we're still using .EXAMPLE for defaults?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It shouldn't be needed anymore

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It should exlude RedisAutoConfig if the property is not present

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good - thanks!

#spring.data.redis.host=localhost
#spring.data.redis.port=6379

Expand Down
Loading