spring-projects / spring-projects/spring-security
When possible use SmartHttpMessageConverter over GenericHttpMessageConverter
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Spring Security often uses GenericHttpMessageConverter for JSON support. The new Jackson support was refined to be a SmartHttpMessageConverter, so we should refine our usage to leverage SmartHttpMessageConverter when possible. Here are a few places that are using GenericHttpMessageConverter:
- config/src/main/java/org/springframework/security/config/web/server/HttpMessageConverters.java
- oauth2/oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/http/converter/HttpMessageConverters.java
- oauth2/oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/oidc/http/converter/HttpMessageConverters.java
- oauth2/oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/HttpMessageConverters.java
- oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/web/OAuth2ProtectedResourceMetadataFilter.java
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the five listed HttpMessageConverters.java files and OAuth2ProtectedResourceMetadataFilter.java to see where GenericHttpMessageConverter is used. Check the available SmartHttpMessageConverter support in the Spring Security and Jackson integration points, then verify that each applicable usage leverages it without changing existing JSON conversion behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend, security
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100