Hi there,

I don't know why, but I keep getting this error when my Spring Auth Server boots up.

Bootup Error

2024-08-03T20:13:07.403+01:00 DEBUG 52986 --- [  restartedMain] o.s.s.jackson2.SecurityJackson2Modules   : Loaded module org.springframework.security.jackson2.CoreJackson2Module, now registering
2024-08-03T20:13:07.404+01:00 DEBUG 52986 --- [  restartedMain] o.s.s.jackson2.SecurityJackson2Modules   : Cannot load module org.springframework.security.cas.jackson2.CasJackson2Module

java.lang.ClassNotFoundException: org.springframework.security.cas.jackson2.CasJackson2Module
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]
    at java.base/java.lang.Class.forName0(Native Method) ~[na:na]
    at java.base/java.lang.Class.forName(Class.java:496) ~[na:na]
    at java.base/java.lang.Class.forName(Class.java:475) ~[na:na]

It doesn't stop the App from loading though.

Namespace

I also don't understand why in Redis it's not saving to my defined namespace: namespace: spring:session:in-house-auth-server (see the YAML properties file in the github repo below). Currently, nothing gets persisted to Redis...

Redis Screenshot

Here is the Redis Screenshot (ignore the api gateway folder) Screenshot 2024-08-03 at 19 52 58

Repo

https://github.com/dreamstar-enterprises/docs/tree/master/Spring%20BFF/auth

The key folders are:

  1. Cookies: where I set the session cookie name (only this method works, I'm not sure why, sessionCookieConfig)
  2. Redis folder: where I've created some Redis Classes
  3. Repositories folder: where I have the files: RedixIndexedSessionRepository, SecurityContextRepository, SessionRegistryConfig,
  4. RequestCache folder: where I create a custom requestCache implementation
  5. Session folder: probably all the files in there
  6. The 3 config files: AuthServerConfig, DefaultSecurityConfig, and TomCatServerConfig
  7. The Yaml properties file

I really am quite stuck!

Aim

All I want to do for now is store the (i) Session ID, (ii) Security Context, (iii) CSRF Token, and (iv) Request Cache to Redis - so not over the moon requirements

I'm quite new to Redis, so am learning.

Would be wonderful if anyone might be able to help.

Comment From: dreamstar-enterprises

resolved