Reputation: 464
I am using Spring Session JDBC in my spring boot application and it's working fine. But it's resulting into lot of calls to database. I want to only invoke the jdbc session management for authenticated users and the anonymous users can keep using the default spring session management. Is there a way to do this?
Upvotes: 2
Views: 314
Reputation: 14830
If possible you should avoid creating sessions for unauthenticated users. If no session is created, no database queries will be done.
The default session creation policy IF_REQUIRED already supports this behaviour.
Upvotes: 0
Reputation: 1
It's not so neglectable on ddos/penetration testing even you bruteforce the main domain of the app, with a postgres database behind has the side effect to fill the pg_wal and crash the database.
Upvotes: 0