https://github.com/spring-projects/spring-security/issues/11916 made the ContentNegotiationStrategy bean available as a shared object in HttpSecurity. However, it is not optimal when thinking about simplifying the HttpSecurity construction (#7449, #11633).

We should change the places where the ContentNegotiationStrategy is being retrieved from the shared objects and retrieve it from the ApplicationContext.