-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Labels
in: webAn issue in web modules (web, webmvc)An issue in web modules (web, webmvc)type: bugA general bugA general bug
Milestone
Description
Origin: spring-projects/spring-session-data-mongodb#33
Problem: Spring WebFlux + Spring Security + Spring Session MongoDB + JacksonMongoSessionConverter.
WebJackson2Module registers multiple mixins including CookieMixin. This fails because Cookie is not on the classpath.
Possible solution: Conditionalize some of these registrations so they are only done when Spring MVC on the classpath.
public void setupModule(SetupContext context) {
SecurityJackson2Modules.enableDefaultTyping((ObjectMapper)context.getOwner());
context.setMixInAnnotations(Cookie.class, CookieMixin.class);
context.setMixInAnnotations(SavedCookie.class, SavedCookieMixin.class);
context.setMixInAnnotations(DefaultCsrfToken.class, DefaultCsrfTokenMixin.class);
context.setMixInAnnotations(DefaultSavedRequest.class, DefaultSavedRequestMixin.class);
context.setMixInAnnotations(WebAuthenticationDetails.class, WebAuthenticationDetailsMixin.class);
context.setMixInAnnotations(PreAuthenticatedAuthenticationToken.class, PreAuthenticatedAuthenticationTokenMixin.class);
}Metadata
Metadata
Assignees
Labels
in: webAn issue in web modules (web, webmvc)An issue in web modules (web, webmvc)type: bugA general bugA general bug