Repository navigation
Replace WebSecurityConfigurerAdapter with a SecurityFilterChain bean - #1264
Merged
devin-ai-integration[bot] merged 1 commit intoNov 17, 2026
Conversation
Co-Authored-By: joel.oshea <joel.oshea@cognition.ai>
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Author
There was a problem hiding this comment.
✅ Devin Review: No Issues Found
Devin Review analyzed this PR and found no bugs or issues to report.
Custom reviewers
devin-ai-integration
Bot
merged commit Nov 17, 2026
a1a428e
into
devin/unt-5-spring-boot-2.7
13 of 14 checks passed
This file contains hidden or 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
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.
Summary
Plan step
s2.3, stacked on #1252.WebSecurityConfigno longer extendsWebSecurityConfigurerAdapter(removed in Security 6); it exposes aSecurityFilterChainbean built with the lambda DSL andauthorizeHttpRequests+requestMatchers. Same rules as before: CSRF off, CORS via the existingcorsConfigurationSource, stateless, 401HttpStatusEntryPoint, OPTIONS //graphiql//graphql/POST /users,/users/login/GET /articles/**,/profiles/**,/tagspublic,GET /articles/feedand everything else authenticated,JwtTokenFilterbeforeUsernamePasswordAuthenticationFilter.requestMatcherstakes explicitAntPathRequestMatchers. Boot 2.7.18 manages Spring Security 5.7.11, not 5.8, and 5.7 only hasrequestMatchers(RequestMatcher...)(theStringoverloads arrive in 5.8). Explicit ant matchers keep exactly whatantMatchersdid, and also avoid Security 6.1's "ambiguous servlet" error forrequestMatchers(String)when the Boot 3 step lands. No dependency version changes.JwtTokenFilteris no longer a bean, so Boot stops also registering it as a servlet filter. It now takesUserRepositoryandJwtServicethrough its constructor (was@Autowiredfields), and the chain method creates it. WithServletContextInitializerBeansat DEBUG, the "Mapping filters" log line no longer listsjwtTokenFilter.Verification (local, JDK 17)
./gradlew clean spotlessCheck test: 68 tests in 20 classes, 0 failures/errors (same as baseline).scripts/smoke/run.sh: 75 calls, "Responses match baseline". No accepted differences, baseline not regenerated. The auth, 401 and CORS cases are unchanged.grep -rn "WebSecurityConfigurerAdapter\|antMatchers\|authorizeRequests" srcfinds nothing.security/snykcheck below. No dependencies changed, so I expect the two advisories already known on Upgrade Spring Boot to 2.7.18 (DGS 5.6.2, MyBatis starter 2.3.2, sqlite-jdbc 3.49.1.0) #1252 and nothing new.Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/06bb22914eb94bffa3da4e01a5720539
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/06bb22914eb94bffa3da4e01a5720539?variant=devin
Requested by: @joeloshea-cog
🟢 Devin Review found nothing to fix · View findings