-
Notifications
You must be signed in to change notification settings - Fork 264
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 ClassNotFoundException when LogbookAutoConfiguration is processed #882
Merged
whiskeysierra
merged 5 commits into
zalando:main
from
jstanik:bugfix/881-class-not-found-exception
Nov 9, 2020
Merged
Fix ClassNotFoundException when LogbookAutoConfiguration is processed #882
whiskeysierra
merged 5 commits into
zalando:main
from
jstanik:bugfix/881-class-not-found-exception
Nov 9, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jstanik
requested review from
AlexanderYastrebov,
lukasniemeier-zalando and
whiskeysierra
as code owners
November 4, 2020 15:34
s-volkov-1
reviewed
Nov 5, 2020
...-autoconfigure/src/main/java/org/zalando/logbook/autoconfigure/LogbookAutoConfiguration.java
Outdated
Show resolved
Hide resolved
I believe it's redundant now. Should be fine to remove those.
…On Thu, 5 Nov 2020, 21:53 jstanik, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
logbook-spring-boot-autoconfigure/src/main/java/org/zalando/logbook/autoconfigure/LogbookAutoConfiguration.java
<#882 (comment)>:
>
}
@configuration(proxyBeanMethods = false)
- @ConditionalOnClass(SecurityFilterChain.class)
+ @ConditionalOnClass({ SecurityFilterChain.class, Filter.class })
@ConditionalOnWebApplication
I have added the web application type SERVLET to both the
SecurityServletFilterConfiguration and ServletFilterConfiguration.
Now I am not sure if keeping the condition
@ConditionalOnClass(Filter.class) makes sense for these.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#882 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADI7HKW55PNCTBCRILSAYLSOMGFRANCNFSM4TKGH5AQ>
.
|
Ok, I removed those redundant conditions. |
...-autoconfigure/src/main/java/org/zalando/logbook/autoconfigure/LogbookAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...-autoconfigure/src/main/java/org/zalando/logbook/autoconfigure/LogbookAutoConfiguration.java
Outdated
Show resolved
Hide resolved
👍 |
I'm currently releasing this fix as 2.4.1. Thank you for your contribution! 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To avoid
ClassNotFoundException: javax.servlet.Filter
a code referencing theFilter
is moved to a static inner class which is processed only conditionally whenjavax.servlet.Filter
is on the classpath.Description
Factory method for creating
FilterRegistrationBean
moved fromLogbookAutoConfiguration
to conditionally processed classServletFilterConfiguration
.Motivation and Context
Fixes issue #881
Types of changes
Checklist: